don't bridge author color on system messages

This commit is contained in:
Jan 2022-11-17 18:20:52 +01:00
parent dd0bfbce37
commit 6449ff3a2e
No known key found for this signature in database
GPG key ID: 5D5E18ACB990F57A

View file

@ -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,