mirror of
https://github.com/Art-Portal/April.git
synced 2024-12-26 03:14:17 +01:00
Re-add adaptive palette image length
This commit is contained in:
parent
f332765653
commit
9be026c006
@ -1,6 +1,6 @@
|
||||
import Canvas from "canvas";
|
||||
import { AttachmentBuilder } from 'discord.js';
|
||||
|
||||
t
|
||||
export default {
|
||||
async execute(interaction){
|
||||
await interaction.deferReply();
|
||||
@ -39,7 +39,7 @@ async function generateRandomPalette() {
|
||||
|
||||
// Fonction pour créer une image représentant la palette de couleurs
|
||||
async function createPaletteImage(colors) {
|
||||
const canvas = Canvas.createCanvas(200, 50);
|
||||
const canvas = Canvas.createCanvas(colors.length * 40, 50);
|
||||
const ctx = canvas.getContext('2d');
|
||||
|
||||
// Dessine les rectangles de couleur sur le canvas
|
||||
|
Loading…
Reference in New Issue
Block a user