use theme colors for embeds
This commit is contained in:
parent
f985c6f499
commit
2f7cfae050
4 changed files with 7 additions and 7 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue