$findRole
Searches for a role by its ID, mention, or name. This function allows you to retrieve a role's ID based on the provided search query.
Usage:
$findRole[ID/mention/name;return current channelID, (yes/no) (Optional, default=yes)]
Parameters:
ID/mention/name
: The ID, mention, or name of the role you want to find.return current channelID, (yes/no)
(Optional): Determines whether to return the current channel's ID if the role is found.yes
(Default): Returns the current channel ID along with the role ID (e.g.,869243919697846379,123456789012345678
where the first number is the Role ID and the second one is the Channel ID).no
: Returns only the role ID.
Example:
Finding a role named "Mika#6359" and not returning the current channel ID:
Example (Role Not Found):
If the role is not found, the function will return undefined
.
Related Functions
- $roleID: Returns the role ID based on the role's name.