From 2f7cfae050836ab245b8a4e0fc540061a829ce6f Mon Sep 17 00:00:00 2001 From: Jan Date: Sat, 16 Jul 2022 14:41:56 +0200 Subject: [PATCH] use theme colors for embeds --- bot/src/bot/commands/moderation/ban.ts | 2 +- bot/src/bot/commands/moderation/kick.ts | 2 +- bot/src/bot/commands/moderation/warn.ts | 2 +- bot/src/bot/util.ts | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bot/src/bot/commands/moderation/ban.ts b/bot/src/bot/commands/moderation/ban.ts index 70834ab..3d120a7 100644 --- a/bot/src/bot/commands/moderation/ban.ts +++ b/bot/src/bot/commands/moderation/ban.ts @@ -90,7 +90,7 @@ export default { try { let user = await parseUserOrId(userStr); if (!user) { - embeds.push(embed(`I can't resolve \`${sanitizeMessageContent(userStr).trim()}\` to a user.`, null, '#ff785d')); + embeds.push(embed(`I can't resolve \`${sanitizeMessageContent(userStr).trim()}\` to a user.`, null, EmbedColor.SoftError)); continue; } diff --git a/bot/src/bot/commands/moderation/kick.ts b/bot/src/bot/commands/moderation/kick.ts index d0d72fe..89b0673 100644 --- a/bot/src/bot/commands/moderation/kick.ts +++ b/bot/src/bot/commands/moderation/kick.ts @@ -59,7 +59,7 @@ export default { try { let user = await parseUserOrId(userStr); if (!user) { - embeds.push(embed(`I can't resolve \`${sanitizeMessageContent(userStr).trim()}\` to a user.`, null, '#ff785d')); + embeds.push(embed(`I can't resolve \`${sanitizeMessageContent(userStr).trim()}\` to a user.`, null, EmbedColor.SoftError)); continue; } diff --git a/bot/src/bot/commands/moderation/warn.ts b/bot/src/bot/commands/moderation/warn.ts index 53bb15b..c4e4a1a 100644 --- a/bot/src/bot/commands/moderation/warn.ts +++ b/bot/src/bot/commands/moderation/warn.ts @@ -58,7 +58,7 @@ export default { reason = reason ? `${userInput} ${reason}` : userInput; } else { - embeds.push(embed(`I can't resolve \`${sanitizeMessageContent(userStr).trim()}\` to a user.`, null, '#ff785d')); + embeds.push(embed(`I can't resolve \`${sanitizeMessageContent(userStr).trim()}\` to a user.`, null, EmbedColor.SoftError)); } continue; } diff --git a/bot/src/bot/util.ts b/bot/src/bot/util.ts index 2269ee6..f8ec22d 100644 --- a/bot/src/bot/util.ts +++ b/bot/src/bot/util.ts @@ -313,10 +313,10 @@ function sanitizeMessageContent(msg: string): string { } enum EmbedColor { - Error = "#ff450c", - SoftError = "#ff785d", - Warning = "#ffda55", - Success = "#23ff91", + Error = "var(--error)", + SoftError = "var(--warning)", + Warning = "var(--warning)", + Success = "var(--success)", } function embed(content: string, title?: string|null, color?: string|EmbedColor): SendableEmbed {