Functionalities
Other
$findRole
Returns the ID of a role with the provided ID/name/mention. Define the 2nd field as `mention` to return the ID as a mention. If the bot cannot find a valid role, bot will return `undefined`.

FUNCTION USAGE

  • $findRole[role]
  • $findRole[role;mention]
  • $findRole[role;name]

Properties:

role - Define a role to return it's ID. Can be name, ID or mention mention - Type the word mention to have the bot mention the role instead of returning the role ID. name - Type the word name to have the bot return the role name instead of returning the role ID.

Example 1: Getting the role ID.

1
bot.Command({
2
name: "test",
3
code: `
4
$findRole[$message[]]
5
`
6
})
Copied!

Example 2: Type the word mention in the 2nd field to return the role mention.

1
bot.Command({
2
name: "test",
3
code: `
4
$findRole[$message[];mention]
5
`
6
})
Copied!

Example 3: Type the word name in the 2nd field to return the role name.

1
bot.Command({
2
name: "test",
3
code: `
4
$findRole[$message[];name]
5
`
6
})
Copied!
Last modified 11mo ago
Copy link
Contents
Properties: