FunctionsRole Functions
$roleCount
The $roleCount function returns the total number of roles present in your Discord server (guild).
Usage
$roleCountThis 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.
!!exec There are $roleCount roles in the server!
There are 23 roles in the server
In this example:
- The user triggers the custom command with
!!exec. - The command uses
$roleCountto retrieve the role count. - The bot responds with a message stating, "There are
23roles in the server" (the number will reflect the actual role count of the server).
Function Difficulty: Easy
Tags: Role Count Amount Of Roles Return Number