This commit is contained in:
Dragon Fire
2020-05-31 10:24:12 -04:00
parent 19f7660fdf
commit 52ae47ccfb
+2 -2
View File
@@ -58,10 +58,10 @@ module.exports = class ScrollOfTruthCommand extends Command {
ctx.font = `${fontSize}px Noto`;
}
const lines = await wrapText(ctx, text, 226);
const topMost = 724 - (((fontSize * lines.length) / 2) + ((20 * (lines.length - 1)) / 2));
const topMost = 850 - (((fontSize * lines.length) / 2) + ((20 * (lines.length - 1)) / 2));
for (let i = 0; i < lines.length; i++) {
const height = topMost + ((fontSize + 20) * i);
ctx.fillText(lines[i], 240, height);
ctx.fillText(lines[i], 340, height);
}
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'scroll-of-truth.png' }] });
}