Entity Info
isMentionable
$isMentionable
The function $isMentionable checks if a Discord role is mentionable by server members. A mentionable role can be used in messages with @Role.
Syntax
$isMentionable[roleID]
Parameters
| Parameter | Description |
|---|---|
roleID |
Required. The ID of the role (in the current server). An invalid ID raises “Invalid role ID.”; an ID that is not a role of the server raises “Role not found.” |
Return Value
| Type | Description |
|---|---|
string |
"true" if the role is mentionable, "false" otherwise. |
Examples
Check a role
$if[$isMentionable[$roleID[Announcements]]==true]
$sendMessage[The Announcements role is mentionable.]
$else
$sendMessage[The Announcements role is not mentionable.]
$endif
List mentionable roles
$sendMessage[The Admin role is $isMentionable[$roleID[Admin]].]
Alert if not mentionable
$if[$isMentionable[$roleID[Modo]]==false]
$sendMessage[⚠️ The Modo role is not mentionable. Members cannot ping it.]
$endif
Notes
- Returns a string
"true"or"false". - Takes exactly one argument; there is no
guildIDparameter. - Useful for checking before sending a role mention.
Try it
Paste an example into the playground to preview its message (functions that act on Discord are not run), or build the same thing with blocks.