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 } = require('@napi-rs/canvas');
const { createCanvas } = require('canvas');
const pool = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ23456789'.split('');
module.exports = class CaptchaCommand extends Command {
@@ -41,7 +41,7 @@ module.exports = class CaptchaCommand extends Command {
ctx.strokeText(text, 15, 26);
await msg.reply(
'**You have 15 seconds, what does the captcha say?**',
{ files: [{ attachment: canvas.toBuffer('image/png'), name: 'captcha-quiz.png' }] }
{ files: [{ attachment: canvas.toBuffer(), name: 'captcha-quiz.png' }] }
);
const msgs = await msg.channel.awaitMessages({
filter: res => res.author.id === msg.author.id,