Entity Info
boostCount
$boostCount
The $boostCount function retrieves the number of server boosts of the current server, as reported by Discord for the server (its premium subscription count).
Syntax
$boostCount[(Guild ID)]
Parameters
| Parameter | Description |
|---|---|
Guild ID |
Optional. The server to read. If omitted or empty, the current server is used. A non-numeric or non-positive value raises Invalid guild ID. |
Return value
- Type: String (number)
- The boost count of the server, read from Discord. An unknown server raises
Guild not found. - If Discord does not give a value, the error
Guild boost count is unavailable.is raised.
Behavior
- The server is read from Discord each time the function runs.
- For the boost level of the server, use
$boostLevel.
Examples
Boost Statistics
$title[🚀 Server Boosts]
$description[
**Number of boosts:** $boostCount
**Level:** Level $boostLevel
]
$thumbnail[$serverIcon]
$color[#F47FFF]
Boosts of another server
$sendMessage[Boosts: $boostCount[123456789012345678]]
Thank-you message
$title[💜 Boost detected!]
$description[
Thank you **$username** for your boost!
The server now has **$boostCount** boosts and is at **level $boostLevel**!
]
$color[#9B59B6]
Storing the values
$var[current;$boostCount]
$var[level;$boostLevel]
$title[📈 Boost Progression]
$description[
**$var[current]** boosts, server at level **$var[level]**
]
$color[#F47FFF]
Notes
- For the current level, use
$boostLevel. $serverBoostCountis similar but returns0instead of an error when the value is unavailable.
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.