bridge role colors

This commit is contained in:
Jan 2022-07-16 14:24:28 +02:00
parent c16e29aa28
commit f985c6f499
Signed by: Lea
GPG key ID: 5D5E18ACB990F57A

View file

@ -196,6 +196,11 @@ client.on('messageCreate', async message => {
masquerade: { masquerade: {
name: message.author.username, name: message.author.username,
avatar: message.author.displayAvatarURL({ size: 128 }), avatar: 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,
}, },
embeds: message.embeds.length embeds: message.embeds.length
? message.embeds.map(e => new GenericEmbed(e).toRevolt()) ? message.embeds.map(e => new GenericEmbed(e).toRevolt())