This commit is contained in:
Dragon Fire
2024-05-03 01:43:58 -04:00
parent ac82000188
commit 570149028a
+1 -9
View File
@@ -1,7 +1,6 @@
const Command = require('../../framework/Command');
const { PermissionFlagsBits } = require('discord.js');
const { createCanvas, loadImage } = require('@napi-rs/canvas');
const { stripIndent } = require('common-tags');
const path = require('path');
const { wrapText } = require('../../util/Canvas');
const texts = require('../../assets/json/be-like-bill');
@@ -51,14 +50,7 @@ module.exports = class BeLikeBillCommand extends Command {
ctx.drawImage(base, 0, 0);
ctx.font = this.client.fonts.get('arialbd.ttf').toCanvasString(23);
const text = wrapText(ctx, texts[Math.floor(Math.random() * texts.length)].replaceAll('{{name}}', name), 569);
ctx.fillText(stripIndent`
This is ${name}.
${text.join('\n')}
${name} is smart.
Be like ${name}.
`, 31, 80);
ctx.fillText(`This is ${name}.\n\n${text.join('\n')}\n\n${name} is smart.\nBe like ${name}.`, 31, 80);
return msg.say({ files: [{ attachment: canvas.toBuffer('image/png'), name: 'be-like-bill.png' }] });
}
};