$roleCount
The $roleCount
function returns the total number of roles present in your Discord server (guild).
$roleCount
Usage: This function is straightforward to use. Simply include it in your command response to display the role count.
Example:
Let's create a custom command that announces the total number of roles in the server.
In this example:
- The user triggers the custom command with
!!exec
. - The command uses
$roleCount
to retrieve the role count. - The bot responds with a message stating, "There are
23
roles in the server" (the number will reflect the actual role count of the server).