Skip to content

$mentionedRoles

$mentionedRoles will return the ID of a role retrieved from a message.

Usage

$mentionedRoles[index]

Parameters

FieldTypeDescriptionRequired
indexnumberThe index of the argument.true

Example(s)

This will return the ID of the first role mention if you attempt to mention any role in this command:

1
client.command({
2
name: "mentionedRoles",
3
code: `
4
$mentionedRoles[1]
5
`
6
});