Skip to content

Commit

Permalink
hotfix for /palette
Browse files Browse the repository at this point in the history
  • Loading branch information
3vorp committed Oct 7, 2023
1 parent 2e4c259 commit 10de83d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/events/buttons/image/palette.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export const button: Button = {
const url = await getImageFromMessage(message);
const [attachment, embed] = await paletteAttachment({
url: url,
name: url.split("/").at(-1),
});

if (attachment == null)
Expand Down
4 changes: 2 additions & 2 deletions src/helpers/images/palette.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const GRADIENT_HEIGHT = 50;

export interface options {
url: string;
name: string;
name?: string;
}

export interface AllColors {
Expand Down Expand Up @@ -171,7 +171,7 @@ export async function paletteAttachment(

const attachment = new MessageAttachment(
colorCanvas.toBuffer("image/png"),
`${options.name ? options.name : "palette.png"}`,
`${options.name || "palette.png"}`,
);

return [attachment, embed];
Expand Down

0 comments on commit 10de83d

Please sign in to comment.