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
|
@ -66,6 +66,7 @@ class Functions {
|
||||||
}
|
}
|
||||||
|
|
||||||
displayHexColour (guild, userID) {
|
displayHexColour (guild, userID) {
|
||||||
|
if (!userID) userID === this.client.user.id;
|
||||||
const roles = this.roleObjects(guild, guild.members.get(userID).roles);
|
const roles = this.roleObjects(guild, guild.members.get(userID).roles);
|
||||||
for (const object of roles) {
|
for (const object of roles) {
|
||||||
if (object.color !== 0) return '#' + object.color.toString(16);
|
if (object.color !== 0) return '#' + object.color.toString(16);
|
||||||
|
|
Loading…
Reference in a new issue