3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-07-14 05:57:18 +00:00

feat: enable coloured starboard embeds

This commit is contained in:
vcokltfre 2021-03-15 22:13:48 +00:00
parent 7dcdb5f72f
commit 9ecb98a0d7
3 changed files with 5 additions and 2 deletions

View file

@ -8,7 +8,7 @@ const videoAttachmentExtensions = ["mp4", "mkv", "mov"];
type StarboardEmbed = EmbedWith<"footer" | "author" | "fields" | "timestamp">;
export function createStarboardEmbedFromMessage(msg: Message, copyFullEmbed: boolean): StarboardEmbed {
export function createStarboardEmbedFromMessage(msg: Message, copyFullEmbed: boolean, color: number): StarboardEmbed {
const embed: StarboardEmbed = {
footer: {
text: `#${(msg.channel as GuildChannel).name}`,
@ -18,6 +18,7 @@ export function createStarboardEmbedFromMessage(msg: Message, copyFullEmbed: boo
},
fields: [],
timestamp: new Date(msg.timestamp).toISOString(),
color: color,
};
if (msg.author.avatarURL) {