mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-17 08:17:35 +02:00
wrapText is no longer async
This commit is contained in:
@@ -61,7 +61,7 @@ module.exports = class ZeroDialogueCommand extends Command {
|
||||
ctx.font = this.client.fonts.get('megaman_zero_dialog.ttf').toCanvasString(42);
|
||||
ctx.fillStyle = 'white';
|
||||
ctx.textBaseline = 'top';
|
||||
let text = await wrapText(ctx, quote, 425);
|
||||
let text = wrapText(ctx, quote, 425);
|
||||
text = text.length > 2 ? `${text.slice(0, 2).join('\n')}...` : text.join('\n');
|
||||
ctx.fillText(text, 8, 8);
|
||||
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'zero-dialogue.png' }] });
|
||||
|
||||
Reference in New Issue
Block a user