mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-27 14:18:36 +02:00
wrapText is no longer async
This commit is contained in:
@@ -80,7 +80,7 @@ module.exports = class AceAttorneyCommand extends Command {
|
||||
ctx.fillStyle = 'white';
|
||||
ctx.textBaseline = 'top';
|
||||
ctx.fillText(firstUpperCase(character), 6, 176);
|
||||
let text = await wrapText(ctx, quote, 242);
|
||||
let text = wrapText(ctx, quote, 242);
|
||||
text = text.length > 5 ? `${text.slice(0, 5).join('\n')}...` : text.join('\n');
|
||||
ctx.fillText(text, 7, 199);
|
||||
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: `ace-attorney-${character}.png` }] });
|
||||
|
||||
Reference in New Issue
Block a user