mirror of
https://github.com/janderedev/automod.git
synced 2024-12-22 10:45:27 +00:00
use theme colors for embeds
This commit is contained in:
parent
f985c6f499
commit
2f7cfae050
|
@ -90,7 +90,7 @@ export default {
|
||||||
try {
|
try {
|
||||||
let user = await parseUserOrId(userStr);
|
let user = await parseUserOrId(userStr);
|
||||||
if (!user) {
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ export default {
|
||||||
try {
|
try {
|
||||||
let user = await parseUserOrId(userStr);
|
let user = await parseUserOrId(userStr);
|
||||||
if (!user) {
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ export default {
|
||||||
reason = reason ? `${userInput} ${reason}` : userInput;
|
reason = reason ? `${userInput} ${reason}` : userInput;
|
||||||
}
|
}
|
||||||
else {
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -313,10 +313,10 @@ function sanitizeMessageContent(msg: string): string {
|
||||||
}
|
}
|
||||||
|
|
||||||
enum EmbedColor {
|
enum EmbedColor {
|
||||||
Error = "#ff450c",
|
Error = "var(--error)",
|
||||||
SoftError = "#ff785d",
|
SoftError = "var(--warning)",
|
||||||
Warning = "#ffda55",
|
Warning = "var(--warning)",
|
||||||
Success = "#23ff91",
|
Success = "var(--success)",
|
||||||
}
|
}
|
||||||
|
|
||||||
function embed(content: string, title?: string|null, color?: string|EmbedColor): SendableEmbed {
|
function embed(content: string, title?: string|null, color?: string|EmbedColor): SendableEmbed {
|
||||||
|
|
Loading…
Reference in a new issue