mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-06 14:20:51 +02:00
Fix
This commit is contained in:
@@ -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' }] });
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user