# C_FriendList: World of Warcraft Forever API

Forever 1.60.1 (70959), Interface 16001, Lua 5.1, from Blizzard's own API documentation. Page: https://wowaddons.gg/forever-api/C_FriendList

## Functions

### C_FriendList.AddFriend

```lua
C_FriendList.AddFriend(name, [notes])
```

Arguments:
- `name`: cstring
- `notes`: cstring, may be nil

### C_FriendList.AddIgnore

```lua
added = C_FriendList.AddIgnore(name)
```

Arguments:
- `name`: cstring

Returns:
- `added`: bool

### C_FriendList.AddOrDelIgnore

```lua
C_FriendList.AddOrDelIgnore(name)
```

Arguments:
- `name`: cstring

### C_FriendList.AddOrRemoveFriend

```lua
C_FriendList.AddOrRemoveFriend(name, notes)
```

Arguments:
- `name`: cstring
- `notes`: cstring

### C_FriendList.DelIgnore

```lua
removed = C_FriendList.DelIgnore(name)
```

Arguments:
- `name`: cstring

Returns:
- `removed`: bool

### C_FriendList.DelIgnoreByIndex

```lua
C_FriendList.DelIgnoreByIndex(index)
```

Arguments:
- `index`: luaIndex

### C_FriendList.GetFriendInfo

```lua
info = C_FriendList.GetFriendInfo(name)
```

May return nothing.

Arguments:
- `name`: cstring

Returns:
- `info`: FriendInfo

### C_FriendList.GetFriendInfoByIndex

```lua
info = C_FriendList.GetFriendInfoByIndex(index)
```

May return nothing.

Arguments:
- `index`: luaIndex

Returns:
- `info`: FriendInfo

### C_FriendList.GetIgnoreName

```lua
name = C_FriendList.GetIgnoreName(index)
```

Arguments:
- `index`: luaIndex

Returns:
- `name`: string, may be nil

### C_FriendList.GetNumFriends

```lua
numFriends = C_FriendList.GetNumFriends()
```

Returns:
- `numFriends`: number

### C_FriendList.GetNumIgnores

```lua
numIgnores = C_FriendList.GetNumIgnores()
```

Returns:
- `numIgnores`: number

### C_FriendList.GetNumOnlineFriends

```lua
numOnline = C_FriendList.GetNumOnlineFriends()
```

Returns:
- `numOnline`: number

### C_FriendList.GetNumWhoResults

```lua
numWhos, totalNumWhos = C_FriendList.GetNumWhoResults()
```

Returns:
- `numWhos`: number
- `totalNumWhos`: number

### C_FriendList.GetSelectedFriend

```lua
index = C_FriendList.GetSelectedFriend()
```

Returns:
- `index`: luaIndex, may be nil

### C_FriendList.GetSelectedIgnore

```lua
index = C_FriendList.GetSelectedIgnore()
```

Returns:
- `index`: luaIndex, may be nil

### C_FriendList.GetWhoInfo

```lua
info = C_FriendList.GetWhoInfo(index)
```

May return nothing.

Arguments:
- `index`: luaIndex

Returns:
- `info`: WhoInfo

### C_FriendList.GetWhoRaceFilters

```lua
filters = C_FriendList.GetWhoRaceFilters()
```

Returns:
- `filters`: WhoFilter[]

### C_FriendList.IsFriend

```lua
isFriend = C_FriendList.IsFriend(guid)
```

Arguments:
- `guid`: WOWGUID

Returns:
- `isFriend`: bool

### C_FriendList.IsIgnored

```lua
isIgnored = C_FriendList.IsIgnored(token)
```

Arguments:
- `token`: cstring

Returns:
- `isIgnored`: bool

### C_FriendList.IsIgnoredByGuid

```lua
isIgnored = C_FriendList.IsIgnoredByGuid(guid)
```

Arguments:
- `guid`: WOWGUID

Returns:
- `isIgnored`: bool

### C_FriendList.IsLegacyFriendSystemEnabled

```lua
isLegacyFriendSystemEnabled = C_FriendList.IsLegacyFriendSystemEnabled()
```

Returns:
- `isLegacyFriendSystemEnabled`: bool

### C_FriendList.IsOnIgnoredList

```lua
isIgnored = C_FriendList.IsOnIgnoredList(token)
```

Arguments:
- `token`: cstring

Returns:
- `isIgnored`: bool

### C_FriendList.RemoveFriend

```lua
removed = C_FriendList.RemoveFriend(name)
```

Arguments:
- `name`: cstring

Returns:
- `removed`: bool

### C_FriendList.RemoveFriendByIndex

```lua
C_FriendList.RemoveFriendByIndex(index)
```

Arguments:
- `index`: luaIndex

### C_FriendList.SendWho

```lua
C_FriendList.SendWho(filter, [origin], [filters])
```

Arguments:
- `filter`: cstring
- `origin`: number, may be nil
- `filters`: SendWhoFilters, may be nil

### C_FriendList.SetFriendNotes

```lua
found = C_FriendList.SetFriendNotes(name, notes)
```

Arguments:
- `name`: cstring
- `notes`: cstring

Returns:
- `found`: bool

### C_FriendList.SetFriendNotesByIndex

```lua
C_FriendList.SetFriendNotesByIndex(index, notes)
```

Arguments:
- `index`: luaIndex
- `notes`: cstring

### C_FriendList.SetSelectedFriend

```lua
C_FriendList.SetSelectedFriend(index)
```

Arguments:
- `index`: luaIndex

### C_FriendList.SetSelectedIgnore

```lua
C_FriendList.SetSelectedIgnore(index)
```

Arguments:
- `index`: luaIndex

### C_FriendList.SetWhoToUi

```lua
C_FriendList.SetWhoToUi(whoToUi)
```

Arguments:
- `whoToUi`: bool

### C_FriendList.ShowFriends

```lua
C_FriendList.ShowFriends()
```

### C_FriendList.SortWho

```lua
C_FriendList.SortWho(sorting, [ascending])
```

Arguments:
- `sorting`: cstring
- `ascending`: bool, may be nil

## Events

### BATTLE_NET_FRIEND_TAG_ENABLED_STATUS_UPDATED

No payload.

### BATTLE_NET_TITLE_FRIEND_CUSTOM_NAME_ENABLED_STATUS_UPDATED

No payload.

### BN_BLOCK_FAILED_TOO_MANY

Payload, after the event's name:
- `blockType`: cstring

### BN_BLOCK_LIST_UPDATED

No payload.

### BN_CHAT_WHISPER_UNDELIVERABLE

Payload, after the event's name:
- `senderID`: number

### BN_CONNECTED

Payload, after the event's name:
- `suppressNotification`: bool, default false

### BN_CUSTOM_MESSAGE_CHANGED

Payload, after the event's name:
- `id`: number, may be nil

### BN_CUSTOM_MESSAGE_LOADED

No payload.

### BN_DISCONNECTED

Payload, after the event's name:
- `result`: bool
- `suppressNotification`: bool, default false

### BN_FRIEND_ACCOUNT_OFFLINE

Payload, after the event's name:
- `friendId`: number
- `isCompanionApp`: bool, default false

### BN_FRIEND_ACCOUNT_ONLINE

Payload, after the event's name:
- `friendId`: number
- `isCompanionApp`: bool, default false

### BN_FRIEND_INFO_CHANGED

Payload, after the event's name:
- `friendIndex`: luaIndex, may be nil

### BN_FRIEND_INVITE_ADDED

Payload, after the event's name:
- `accountID`: number

### BN_FRIEND_INVITE_LIST_INITIALIZED

Payload, after the event's name:
- `listSize`: number

### BN_FRIEND_INVITE_REMOVED

No payload.

### BN_FRIEND_LIST_SIZE_CHANGED

Payload, after the event's name:
- `accountID`: number, may be nil

### BN_INFO_CHANGED

No payload.

### BN_REQUEST_FOF_SUCCEEDED

No payload.

### CONFIRM_BATTLE_NET_FRIEND_INVITE_SHOW

Payload, after the event's name:
- `name`: cstring
- `friendLevel`: BattleNetFriendLevel

### FRIENDLIST_UPDATE

No payload.

### IGNORELIST_UPDATE

No payload.

### LEGACY_FRIEND_SYSTEM_STATUS_UPDATED

No payload.

### MUTELIST_UPDATE

No payload.

### NEW_MATCHMAKING_PARTY_INVITE

No payload.

### REJECTED_MATCHMAKING_PARTY_INVITE

Payload, after the event's name:
- `name`: cstring

### SOCIAL_UI_FRIENDS_LIST_SYSTEM_STATUS_UPDATED

No payload.

### WHO_LIST_UPDATE

No payload.

## Tables

### FriendInfo (structure)

- `connected`: bool
- `name`: string
- `className`: string, may be nil
- `area`: string, may be nil
- `notes`: string, may be nil
- `guid`: WOWGUID
- `level`: number
- `dnd`: bool
- `afk`: bool
- `rafLinkType`: RafLinkType

### SendWhoFilters (structure)

- `classIDs`: number[]
- `raceIDs`: number[]
- `uiMapIDs`: number[]

### WhoFilter (structure)

- `name`: string
- `ID`: number

### WhoInfo (structure)

- `fullName`: string
- `fullGuildName`: string
- `level`: number
- `raceStr`: string
- `classStr`: string
- `area`: string
- `filename`: string, may be nil
- `gender`: number
- `timerunningSeasonID`: number, may be nil

---
Make an addon with your AI: tell it "Read https://wowaddons.gg/agents.md, then make me a World of Warcraft Forever addon that …, try it with me in the game, and publish it."
