From dad49513267f303635fd2428b4e251948a5fc786 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sun, 21 Apr 2024 17:50:01 -0400 Subject: [PATCH] Fix --- commands/edit-image-text/tweet.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/commands/edit-image-text/tweet.js b/commands/edit-image-text/tweet.js index b0e9ecf5..dd5f89ac 100644 --- a/commands/edit-image-text/tweet.js +++ b/commands/edit-image-text/tweet.js @@ -70,12 +70,7 @@ module.exports = class TweetCommand extends Command { const ctx = canvas.getContext('2d'); ctx.font = this.client.fonts.get('ChirpRegular.ttf').toCanvasString(23); const lines = await wrapText(ctx, text, 710); - const lineBreakLen = text.split('\n').length; - const linesLen = (23 * lines.length) - + (23 * (lineBreakLen - 1)) - + (9 * (lines.length - 1)) - + (9 * (lineBreakLen - 1)) - + 15; + const linesLen = (23 * lines.length) + (9 * (lines.length - 1)) + 15; canvas.height += linesLen; let imageHeight = 0; ctx.fillStyle = 'black';