API BNGetNumFriends

From Wowpedia
Jump to: navigation, search

Returns info about how much Battle.net friends are added to the friendslist and how much of them are currently online.

numBNetTotal, numBNetOnline, numBNetFavorite, numBNetFavoriteOnline = BNGetNumFriends()

Returns

numBNetTotal 
number - amount of Battle.net friends on the friends list
numBNetOnline 
number - online Battle.net friends
numBNetFavorite 
number - favorite battle.net friends
numBNetFavoriteOnline 
number - favorite online battle.net friends

Example

local total, online = BNGetNumFriends()
print("You have "..total.." Battle.net friends and "..online.." of them are online!")

Patch changes

  • Battle for Azeroth Patch 8.2.0 (2019-06-25): Added numBNetFavorite and numBNetFavoriteOnline. This fixes the friends list sorting.
  • Wrath of the Lich King Patch 3.3.5 (2010-06-22): Added.