feat: add color option to starboard (#163)
Co-authored-by: Almeida <42935195+almeidx@users.noreply.github.com>
This commit is contained in:
parent
2e50fa7630
commit
fcbb25b7ff
4 changed files with 18 additions and 2 deletions
|
@ -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,
|
||||
};
|
||||
|
||||
if (msg.author.avatarURL) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue