API GetNumGuildMembers

Returns the number of guild members. numTotalGuildMembers, numOnlineGuildMembers, numOnlineAndMobileMembers = GetNumGuildMembers;

Returns

 * numTotalGuildMembers : Integer - Total number of players in the Guild, or 0 if not in a guild.
 * numOnlineGuildMembers : Integer - Number of players currently online in Guild, or 0 if not in a guild.
 * numOnlineAndMobileMembers : Integer - Number of players currently online in Guild (includes players online through the mobile application), or 0 if not in a guild.

Example
local numTotal, numOnline, numOnlineAndMobile = GetNumGuildMembers; DEFAULT_CHAT_FRAME:AddMessage(numTotal .. " guild members: " .. numOnline .. " online, " .. (numTotal - numOnline) .. " offline, " .. (numOnlineAndMobile - numOnline) .. " on mobile.");

Result
Displays the number of people online, offline, on mobile, and the total headcount of your guild in the default chat frame.