$userRoleColor

Returns the hex color code of the user's highest role.

Usage

  • $userRoleColor - Returns the color of the user who executed the command.
  • $userRoleColor[userID] - Returns the color of the user with the specified User ID.

Example

Here's an example of how $userRoleColor might be used in a command:

Member04/20/2025
!!exec $userRoleColor
Custom Command Bot 04/20/2025
#fff00

Important: Member Caching

For the default bot, the member whose role color you're trying to retrieve must be cached (i.e., the bot must be aware of the user). This usually isn't an issue if the user is active in the server.

If you are using a custom bot, you can generally ignore this caching requirement.

Difficulty: Easy
Tags: color