Functionalities
Other
Powered By GitBook
$guildRoles
Returns the collection of roles in a guild. If guild has too many roles, the command with this function in it will not execute.

FUNCTION USAGE

    $guildRoles
    $guildRoles[]
    $guildRoles[guildID]
    $guildRoles[guildID;option]
    $guildRoles[guildID;option;separator]

Properties:

[] - Leave brackets empty to return the roles of the current guild. Same as no brackets. guildID - Supplying a specific guild ID will get the roles of that server. option - Returns the roles with the specific option. Defaults to id. separator - Separates each role with the defined separator. Defaults to , .

Options:

name - The names of the set of roles. mention - The set of roles formatted into their mention forms. id - The IDs of the set of roles.
Example 1: Returns all the names of the roles in the current guild.
1
bot.Command({
2
name: "server",
3
code: `
4
$guildRoles
5
`
6
})
Copied!
Example 2: Returns all the mentions of the roles in the defined guild. Separated by " | ".
1
bot.Command({
2
name: "server",
3
code: `
4
$guildRoles[$guildID[DB-Script Official Server];mention; | ]
5
`
6
})
Copied!
Last modified 3mo ago
Copy link