eu.astrogd.white-leopard/src/tools/defaultEmbeds.ts

32 lines
922 B
TypeScript
Raw Normal View History

2022-11-23 13:23:25 +01:00
import pack from "../../package.json";
import { EmbedBuilder } from "discord.js";
import client from "../client";
2022-11-24 16:25:20 +01:00
import { Color, Emoji } from "./design";
2022-11-23 13:23:25 +01:00
// const _coolColors = [0x054566];
export default function getDefaultEmbed(): EmbedBuilder {
const embed = new EmbedBuilder();
embed.setFooter({
2022-11-25 16:20:12 +01:00
text: `Channel filter V${pack.version}`,
2022-11-23 13:23:25 +01:00
iconURL: client.user?.avatarURL() || undefined,
});
embed.setTimestamp(new Date());
2022-11-24 16:25:20 +01:00
embed.setColor(Color.ANONYMOUS_GRAY);
2022-11-23 13:23:25 +01:00
return embed;
}
export function getSuccessEmbed(): EmbedBuilder {
const embed = getDefaultEmbed();
2022-11-24 16:25:20 +01:00
embed.setTitle(`${Emoji.CHAT_APPROVE} Success`);
embed.setColor(Color.SUCCESSFUL_GREEN);
2022-11-23 13:23:25 +01:00
return embed;
2022-11-24 15:36:33 +01:00
}
export function getFailedEmbed(): EmbedBuilder {
const embed = getDefaultEmbed();
2022-11-24 16:25:20 +01:00
embed.setTitle(`${Emoji.CHAT_DENY} Failed`);
embed.setColor(Color.STOPSIGN_RED);
2022-11-24 15:36:33 +01:00
return embed;
2022-11-23 13:23:25 +01:00
}