Fix error that would cause the entire 12 lines to be cut out

This commit is contained in:
Dragon Fire
2020-03-28 13:35:42 -04:00
parent c11a490c54
commit 3156d1e03d
+4 -1
View File
@@ -50,7 +50,10 @@ module.exports = class LisaPresentationCommand extends Command {
ctx.textBaseline = 'top';
ctx.font = '19px Akbar';
ctx.fillStyle = 'white';
ctx.fillText(shortenText(ctx, `${text.toUpperCase()}\n`.repeat(12).trim(), 500), 30, 27);
const shortened = shortenText(ctx, text.toUpperCase(), 500);
const arr = [];
for (let i = 0; i < 12; i++) arr.push(shortened);
ctx.fillText(arr.join('\n'), 30, 27);
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'bart-chalkboard.png' }] });
}
};