$colorRole
Changes the color of a role with the given hex color and roleID. If no hex color is provided, the color will be `black` by default.

FUNCTION USAGE

    $colorRole[roleID;hex]
    $colorRole[roleID;guildID;hex]

Properties:

roleID - The role ID of the role you're changing the color of. guildID - The guild where the role belongs to. Defaults to current guild. hex - The hex color to change the role to.
Cannot use color names with this function!

Example 1: Turning a role a default red

1
bot.Command({
2
name: "color-role",
3
code: `
4
$colorRole[$findRole[$message[]];ff0000]
5
`
6
})
Copied!

Example 2: Choosing a color to change a specific role

1
bot.Command({
2
name: "color-role",
3
code: `
4
$colorRole[$findRole[$message[1]];$message[2]]
5
`
6
})
Copied!

Example 3: Choosing a color to change a specific role in a specific guild.

1
bot.Command({
2
name: "color-role",
3
code: `
4
$colorRole[$findRole[$message[1]];$guildID[DB-Script Official Server];$message[2]]
5
`
6
})
Copied!
Last modified 3mo ago
Copy link
Contents
Properties: