From Warcraft Wiki
(Redirected from API GetSelectedFriend)
Jump to navigation Jump to search

Returns the index of the currently selected friend.

index = C_FriendList.GetSelectedFriend()


number? - The index of the friend which is currently selected on the friend list. Returns nil if you have no friends.


  • This function is necessary because indices can change in response to friend status updates.

Patch changes

Battle for Azeroth Patch 8.1.0 (2018-12-11): Moved to C_FriendList. The former alias GetSelectedFriend is deprecated and will be removed in the following expansion.