$role
A powerful and compact function to retrieve various properties of a Discord role!
Usage: $role[roleid;property]
This function takes two arguments:
roleid: The ID of the role you want to get information from.property: The specific piece of information you want to retrieve.
Supported Properties:
Here's a list of the available properties you can use with the $role function:
name: The role's name (e.g., "Moderator").mention: The role's mention string (e.g.,<@&1234567890>).id: The role's ID (e.g.,1234567890).hex: The role's color in hexadecimal format (e.g.,#FF0000for red).color: The role's color as a 10-base number.created: The date and time when the role was created.position: The role's position in the role hierarchy. Lower numbers mean higher priority.rawposition: The role's raw position in the role list.guildid: The ID of the guild (server) where the role exists.guildname: The name of the guild (server) where the role exists.timestamp: The creation timestamp of the role.ismentionable: Returnstrueif the role can be mentioned,falseotherwise.iseditable: Returnstrueif the bot can edit the role,falseotherwise.ismanaged: Returnstrueif the role is managed by an integration (like a bot),falseotherwise.ishoisted: Returnstrueif the role is hoisted (displayed separately in the member list),falseotherwise.usercount: The number of users who have this role. (Note: This value is cached and might not be perfectly up-to-date.)icon: Returns the role's icon URL if it exists. Returnsundefinedif the role has no icon.
Example:
This example retrieves the position of the role with the ID 798789079070970. The bot responds with 2, indicating the role's position in the role hierarchy.