default to bots highest role for colour
This commit is contained in:
parent
17f90fcc6a
commit
1aa5c8c482
1 changed files with 2 additions and 1 deletions
|
@ -27,7 +27,7 @@ class Functions {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
intBetween (min, max) {
|
||||
return Math.round((Math.random() * (max - min) + min));
|
||||
}
|
||||
|
@ -66,6 +66,7 @@ class Functions {
|
|||
}
|
||||
|
||||
displayHexColour (guild, userID) {
|
||||
if (!userID) userID === this.client.user.id;
|
||||
const roles = this.roleObjects(guild, guild.members.get(userID).roles);
|
||||
for (const object of roles) {
|
||||
if (object.color !== 0) return '#' + object.color.toString(16);
|
||||
|
|
Loading…
Reference in a new issue