FunctionsRole Functions
$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,123456789012345678where 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:
Member
9/5/2026
!!exec $findRole[Mika#6359;no]
Custom Command
APP
9/5/2026
869243919697846379
Example (Role Not Found):
If the role is not found, the function will return undefined.
Member
9/5/2026
!!exec $findRole[mika#6359;no]
Custom Command
APP
9/5/2026
undefined
Related Functions
$roleID: Returns the role ID based on the role's name.
Function difficulty: Medium
Tags: Find Role Role ID Roles Search Roles Found Roles