From 34cec1e033c6c100399af539983092e4f8df8b1a Mon Sep 17 00:00:00 2001 From: Hri7566 Date: Fri, 8 Mar 2024 21:04:56 -0500 Subject: [PATCH] Color "fix" --- src/discord/bot/Bot.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/discord/bot/Bot.ts b/src/discord/bot/Bot.ts index a8bd840..d6c39a1 100644 --- a/src/discord/bot/Bot.ts +++ b/src/discord/bot/Bot.ts @@ -159,17 +159,20 @@ export class DiscordBot extends EventEmitter { const role = await this.server.roles.create({ name: member.id, - color: parseInt(msg.color.substring(1), 16) + color: msg.color }); await member.roles.add(role); - return; } catch (err) { + this.logger.warn( + "Unable to create and set color for user ID:", + msg.id + ); return; } + } else { + await existingRole.setColor(msg.color); } - - await existingRole.setColor(parseInt(msg.color.substring(1), 16)); }); this.b.on("sendchat", msg => {