mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-23 10:02:05 +02:00
Transition to @napi-rs/canvas
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
const Command = require('../../framework/Command');
|
||||
const { PermissionFlagsBits } = require('discord.js');
|
||||
const { createCanvas } = require('canvas');
|
||||
const { createCanvas } = require('@napi-rs/canvas');
|
||||
const ntc = require('ntcjs');
|
||||
|
||||
module.exports = class ColorCommand extends Command {
|
||||
@@ -33,7 +33,7 @@ module.exports = class ColorCommand extends Command {
|
||||
ctx.fillStyle = color.toLowerCase();
|
||||
ctx.fillRect(0, 0, 250, 250);
|
||||
return msg.say(`${color.toUpperCase()} - ${name[1]}`, {
|
||||
files: [{ attachment: canvas.toBuffer(), name: 'color.png' }]
|
||||
files: [{ attachment: canvas.toBuffer('image/png'), name: 'color.png' }]
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user