diff --git a/src/Events/messageCreate.ts b/src/Events/messageCreate.ts index 8ccc5075..4d19177b 100644 --- a/src/Events/messageCreate.ts +++ b/src/Events/messageCreate.ts @@ -126,6 +126,11 @@ export default { }; } else { + if (connection.embedColor) { + censoredEmbed.setColor(connection.embedColor as HexColorString); + embed.setColor(connection.embedColor as HexColorString); + } + webhookMessage = { components: replyButton ? [replyButton] : undefined, embeds: [connection.profFilter ? censoredEmbed : embed], @@ -135,15 +140,6 @@ export default { threadId: connection.parentId ? connection.channelId : undefined, allowedMentions: { parse: [] }, }; - - if (connection.embedColor && webhookMessage.embeds - && /^#[0-9A-F]{6}$/i.test(connection.embedColor) - ) { - webhookMessage.embeds.push(EmbedBuilder.from(webhookMessage.embeds[0]) - .setColor(connection.embedColor as HexColorString), - ); - webhookMessage.embeds.splice(0, 1); - } } const webhook = new WebhookClient({ url: connection.webhookURL });