World of Warcraft Forever API · C_FriendList.md, for your AI
C_FriendList
32 functions, 27 events, 4 tables, as Blizzard documents them for Forever 1.60.1 (70959).
Making an addon with an 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. It checks every call against this API before you try it in the game, then publishes it here. How it works.
Functions
C_FriendList.AddFriend
C_FriendList.AddFriend(name, [notes])
Arguments
name | cstring | |
|---|---|---|
notes | cstring may be nil |
C_FriendList.AddIgnore
added = C_FriendList.AddIgnore(name)
Arguments
name | cstring |
|---|
Returns
added | bool |
|---|
C_FriendList.AddOrDelIgnore
C_FriendList.AddOrDelIgnore(name)
Arguments
name | cstring |
|---|
C_FriendList.AddOrRemoveFriend
C_FriendList.AddOrRemoveFriend(name, notes)
Arguments
name | cstring | |
|---|---|---|
notes | cstring |
C_FriendList.DelIgnore
removed = C_FriendList.DelIgnore(name)
Arguments
name | cstring |
|---|
Returns
removed | bool |
|---|
C_FriendList.DelIgnoreByIndex
C_FriendList.DelIgnoreByIndex(index)
Arguments
index | luaIndex |
|---|
C_FriendList.GetFriendInfo
info = C_FriendList.GetFriendInfo(name)
May return nothing.
Arguments
name | cstring |
|---|
Returns
info | FriendInfo |
|---|
C_FriendList.GetFriendInfoByIndex
info = C_FriendList.GetFriendInfoByIndex(index)
May return nothing.
Arguments
index | luaIndex |
|---|
Returns
info | FriendInfo |
|---|
C_FriendList.GetIgnoreName
name = C_FriendList.GetIgnoreName(index)
Arguments
index | luaIndex |
|---|
Returns
name | string may be nil |
|---|
C_FriendList.GetNumFriends
numFriends = C_FriendList.GetNumFriends()
Returns
numFriends | number |
|---|
C_FriendList.GetNumIgnores
numIgnores = C_FriendList.GetNumIgnores()
Returns
numIgnores | number |
|---|
C_FriendList.GetNumOnlineFriends
numOnline = C_FriendList.GetNumOnlineFriends()
Returns
numOnline | number |
|---|
C_FriendList.GetNumWhoResults
numWhos, totalNumWhos = C_FriendList.GetNumWhoResults()
Returns
numWhos | number | |
|---|---|---|
totalNumWhos | number |
C_FriendList.GetSelectedFriend
index = C_FriendList.GetSelectedFriend()
Returns
index | luaIndex may be nil |
|---|
C_FriendList.GetSelectedIgnore
index = C_FriendList.GetSelectedIgnore()
Returns
index | luaIndex may be nil |
|---|
C_FriendList.GetWhoInfo
info = C_FriendList.GetWhoInfo(index)
May return nothing.
Arguments
index | luaIndex |
|---|
Returns
info | WhoInfo |
|---|
C_FriendList.GetWhoRaceFilters
filters = C_FriendList.GetWhoRaceFilters()
Returns
filters | WhoFilter[] |
|---|
C_FriendList.IsFriend
isFriend = C_FriendList.IsFriend(guid)
Arguments
guid | WOWGUID |
|---|
Returns
isFriend | bool |
|---|
C_FriendList.IsIgnored
isIgnored = C_FriendList.IsIgnored(token)
Arguments
token | cstring |
|---|
Returns
isIgnored | bool |
|---|
C_FriendList.IsIgnoredByGuid
isIgnored = C_FriendList.IsIgnoredByGuid(guid)
Arguments
guid | WOWGUID |
|---|
Returns
isIgnored | bool |
|---|
C_FriendList.IsLegacyFriendSystemEnabled
isLegacyFriendSystemEnabled = C_FriendList.IsLegacyFriendSystemEnabled()
Returns
isLegacyFriendSystemEnabled | bool |
|---|
C_FriendList.IsOnIgnoredList
isIgnored = C_FriendList.IsOnIgnoredList(token)
Arguments
token | cstring |
|---|
Returns
isIgnored | bool |
|---|
C_FriendList.RemoveFriend
removed = C_FriendList.RemoveFriend(name)
Arguments
name | cstring |
|---|
Returns
removed | bool |
|---|
C_FriendList.RemoveFriendByIndex
C_FriendList.RemoveFriendByIndex(index)
Arguments
index | luaIndex |
|---|
C_FriendList.SendWho
C_FriendList.SendWho(filter, [origin], [filters])
Arguments
filter | cstring | |
|---|---|---|
origin | number may be nil | |
filters | SendWhoFilters may be nil |
C_FriendList.SetFriendNotes
found = C_FriendList.SetFriendNotes(name, notes)
Arguments
name | cstring | |
|---|---|---|
notes | cstring |
Returns
found | bool |
|---|
C_FriendList.SetFriendNotesByIndex
C_FriendList.SetFriendNotesByIndex(index, notes)
Arguments
index | luaIndex | |
|---|---|---|
notes | cstring |
C_FriendList.SetSelectedFriend
C_FriendList.SetSelectedFriend(index)
Arguments
index | luaIndex |
|---|
C_FriendList.SetSelectedIgnore
C_FriendList.SetSelectedIgnore(index)
Arguments
index | luaIndex |
|---|
C_FriendList.SetWhoToUi
C_FriendList.SetWhoToUi(whoToUi)
Arguments
whoToUi | bool |
|---|
C_FriendList.ShowFriends
C_FriendList.ShowFriends()
C_FriendList.SortWho
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
blockType | cstring |
|---|
BN_BLOCK_LIST_UPDATED
No payload.
BN_CHAT_WHISPER_UNDELIVERABLE
senderID | number |
|---|
BN_CONNECTED
suppressNotification | bool default false |
|---|
BN_CUSTOM_MESSAGE_CHANGED
id | number may be nil |
|---|
BN_CUSTOM_MESSAGE_LOADED
No payload.
BN_DISCONNECTED
result | bool | |
|---|---|---|
suppressNotification | bool default false |
BN_FRIEND_ACCOUNT_OFFLINE
friendId | number | |
|---|---|---|
isCompanionApp | bool default false |
BN_FRIEND_ACCOUNT_ONLINE
friendId | number | |
|---|---|---|
isCompanionApp | bool default false |
BN_FRIEND_INFO_CHANGED
friendIndex | luaIndex may be nil |
|---|
BN_FRIEND_INVITE_ADDED
accountID | number |
|---|
BN_FRIEND_INVITE_LIST_INITIALIZED
listSize | number |
|---|
BN_FRIEND_INVITE_REMOVED
No payload.
BN_FRIEND_LIST_SIZE_CHANGED
accountID | number may be nil |
|---|
BN_INFO_CHANGED
No payload.
BN_REQUEST_FOF_SUCCEEDED
No payload.
CONFIRM_BATTLE_NET_FRIEND_INVITE_SHOW
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
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 |