Skip to content

Commit

Permalink
fix colors
Browse files Browse the repository at this point in the history
  • Loading branch information
3vorp committed Oct 8, 2023
1 parent 2828ca4 commit 8d742fb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/commands/bot/embed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,18 @@ export const command: SlashCommand = {
// a lot of copy/paste but this is the best djs can do lol
const title = interaction.options.getString("title", false);
const description = interaction.options.getString("description", false);
const color = interaction.options.getString("color", false);
const baseColor = interaction.options.getString("color", false);
const footer = interaction.options.getString("footer", false);
const image = interaction.options.getAttachment("image", false)?.url;
const thumbnail = interaction.options.getAttachment("thumbnail", false)?.url;

if (title) embed.setTitle(title);
if (description) embed.setDescription(description);
if (color) embed.setColor(color as ColorResolvable);
if (baseColor) {
let color = baseColor;
if (!baseColor.startsWith("#")) embed.setColor(`#${color}`);
embed.setColor(color as ColorResolvable);
}
if (footer) embed.setFooter({ text: footer });
if (image) embed.setImage(image);
if (thumbnail) embed.setThumbnail(thumbnail);
Expand Down

0 comments on commit 8d742fb

Please sign in to comment.