napi-rs/canvas doesn't support line breaks????

This commit is contained in:
Dragon Fire
2024-05-03 01:49:01 -04:00
parent 570149028a
commit 8a5af83844
173 changed files with 332 additions and 332 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
const Command = require('../../framework/Command');
const { PermissionFlagsBits } = require('discord.js');
const { createCanvas, loadImage } = require('@napi-rs/canvas');
const { createCanvas, loadImage } = require('canvas');
const request = require('node-superfetch');
const path = require('path');
const { centerImagePart } = require('../../util/Canvas');
@@ -45,6 +45,6 @@ module.exports = class ThisGuyCommand extends Command {
ctx.drawImage(base, 0, 0);
const { x, y, width, height } = centerImagePart(data, 361, 361, 76, 62);
ctx.drawImage(data, x, y, width, height);
return msg.say({ files: [{ attachment: canvas.toBuffer('image/png'), name: 'this-guy.png' }] });
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'this-guy.png' }] });
}
};