Skip to content
Entity Info memberCount

$memberCount[] — Number of Members

$memberCount returns the total number of members present on the Discord server, including both human users and bots.

Syntax

$memberCount

Parameters

None.

Return Value

  • Type : integer
  • The total number of members (users + bots).

Examples

Simple display

$sendMessage[👥 **$memberCount** members on this server!]

Statistics embed

$title[📊 $serverName Statistics]
$addField[👥 Total Members;$memberCount;yes]
$addField[🟢 Online;$onlineMembers;yes]
$addField[🤖 Bots;$botCount;yes]
$addField[👤 Humans;$sub[$memberCount;$botCount];yes]
$thumbnail[$serverIcon]
$color[#5865F2]

Custom welcome message

$sendMessage[Welcome $username! You are member #$memberCount! 🎉]

Server size check

$if[$memberCount>=1000]
$sendMessage[🌟 This server has more than 1000 members!]
$elseIf[$memberCount>=100]
$sendMessage[👍 This server has more than 100 members.]
$else
$sendMessage[🌱 This server is still growing!]
$endif

Milestone checks

$if[$memberCount==100]
$sendMessage[🎉 **100 MEMBERS!** Congratulations to the entire community!]
$elseIf[$memberCount==500]
$sendMessage[🚀 **500 MEMBERS!** Thank you all for your support!]
$elseIf[$memberCount==1000]
$sendMessage[🌟 **1000 MEMBERS!** What an incredible milestone!]
$endif

Notes

  • The count includes all members, including bots.
  • The value is the number of members the bot obtains by listing the server’s members from Discord (1000 per request), not a cached counter. It is the same function as $membersCount (and $getMembersCount).
  • To get only the number of human users, use $sub[$memberCount;$botCount].
  • $onlineMembers returns a host-supplied online count when there is one; otherwise it returns the same total as $memberCount (see its page).

Try it

Paste an example into the playground to preview its message (functions that act on Discord are not run), or build the same thing with blocks.