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
+1 -1
View File
@@ -45,7 +45,7 @@ module.exports = class ReactionMemeCommand extends Command {
const canvas = createCanvas(base.width, base.height);
const ctx = canvas.getContext('2d');
ctx.font = this.client.fonts.get('Noto-Regular.ttf').toCanvasString(40);
const lines = await wrapText(ctx, text, base.width - 10);
const lines = wrapText(ctx, text, base.width - 10);
const lineBreakLen = text.split('\n').length;
const linesLen = (40 * lines.length)
+ (40 * (lineBreakLen - 1))