wrapText is no longer async

This commit is contained in:
Dragon Fire
2024-04-26 00:27:42 -04:00
parent fcaa13c576
commit aa78cd91c2
41 changed files with 53 additions and 53 deletions
+2 -2
View File
@@ -59,7 +59,7 @@ module.exports = class TwoButtonsCommand extends Command {
fontSize--;
ctx.font = this.client.fonts.get('Noto-Regular.ttf').toCanvasString(fontSize);
}
const firstLines = await wrapText(ctx, first, 183);
const firstLines = wrapText(ctx, first, 183);
let lineOffset = 0;
for (let i = 0; i < firstLines.length; i++) {
ctx.fillText(firstLines[i], 25 + lineOffset, 116 + (fontSize * i) + (10 * i), 183);
@@ -71,7 +71,7 @@ module.exports = class TwoButtonsCommand extends Command {
fontSize--;
ctx.font = this.client.fonts.get('Noto-Regular.ttf').toCanvasString(fontSize);
}
const secondLines = await wrapText(ctx, second, 118);
const secondLines = wrapText(ctx, second, 118);
lineOffset = 0;
for (let i = 0; i < secondLines.length; i++) {
ctx.fillText(secondLines[i], 254 + lineOffset, 130 + (fontSize * i) + (10 * i), 118);