Entity Info
botCount
$botCount[] — Number of Bots
$botCount[] returns the number of bot accounts among the members of the server where the command runs (the bot itself included).
Syntax
$botCount[(ignored)]
Parameters
| Parameter | Description | Required |
|---|---|---|
ignored |
The engine accepts one optional argument but ignores it: the count is always for the current server. | No |
Return value
- Type:
integer - The number of members of the current server whose account is a bot. The engine lists all members of the server to compute it.
Examples
Simple display
$sendMessage[🤖 **$botCount** bots on this server.]
Human/Bot Ratio
$var[humans;$sub[$membersCount;$botCount]]
$title[📊 Composition of $serverName]
$addField[👤 Humans;$var[humans];yes]
$addField[🤖 Bots;$botCount;yes]
$addField[👥 Total;$membersCount;yes]
$color[#5865F2]
Alert if too many bots
$if[$botCount>$var[humans]]
$sendMessage[⚠️ There are more bots ($botCount) than humans ($var[humans])!]
$endif
Complete Statistics
$title[📊 Statistics for $serverName]
$addField[👥 Total;$membersCount;yes]
$addField[👤 Humans;$sub[$membersCount;$botCount];yes]
$addField[🤖 Bots;$botCount;yes]
$thumbnail[$serverIcon]
$color[#5865F2]
Notes
- A “bot” is determined by the
botflag set on the Discord user account. - To get the number of humans, subtract
$botCountfrom the total:$sub[$membersCount;$botCount]. - The bot running the command is included in this total.
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.