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
@@ -58,7 +58,7 @@ module.exports = class WhiteboardCommand extends Command {
fontSize--;
ctx.font = this.client.fonts.get('Noto-Regular.ttf').toCanvasString(fontSize);
}
const initialLines = await wrapText(ctx, initial, 405);
const initialLines = wrapText(ctx, initial, 405);
const initialTopMost = 111 - (((fontSize * initialLines.length) / 2) + ((10 * (initialLines.length - 1)) / 2));
for (let i = 0; i < initialLines.length; i++) {
const height = initialTopMost + ((fontSize + 10) * i);
@@ -70,7 +70,7 @@ module.exports = class WhiteboardCommand extends Command {
fontSize--;
ctx.font = this.client.fonts.get('Noto-Regular.ttf').toCanvasString(fontSize);
}
const resolveLines = await wrapText(ctx, resolved, 367);
const resolveLines = wrapText(ctx, resolved, 367);
const resolveTopMost = 500 - (((fontSize * resolveLines.length) / 2) + ((10 * (resolveLines.length - 1)) / 2));
for (let i = 0; i < resolveLines.length; i++) {
const height = resolveTopMost + ((fontSize + 10) * i);