From 6449ff3a2e5e51ae6d8f9654b98d45875123dd98 Mon Sep 17 00:00:00 2001 From: Jan Date: Thu, 17 Nov 2022 18:20:52 +0100 Subject: [PATCH] don't bridge author color on system messages --- bridge/src/discord/events.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/bridge/src/discord/events.ts b/bridge/src/discord/events.ts index f274281..a6a88a7 100644 --- a/bridge/src/discord/events.ts +++ b/bridge/src/discord/events.ts @@ -313,11 +313,13 @@ client.on("messageCreate", async (message) => { : bridgeCfg.config?.bridge_nicknames ? message.member?.displayAvatarURL({ size: 128 }) : message.author.displayAvatarURL({ size: 128 }), - colour: channel.server?.havePermission("ManageRole") - ? message.member?.displayColor // Discord.js returns black or 0 instead of undefined when no role color is set - ? message.member?.displayHexColor - : "var(--foreground)" - : undefined, + colour: + channel.server?.havePermission("ManageRole") && + !message.system + ? message.member?.displayColor // Discord.js returns black or 0 instead of undefined when no role color is set + ? message.member?.displayHexColor + : "var(--foreground)" + : undefined, }, embeds: [ ...stickerEmbeds,