From eb12166f90a295a1751f58e98cdbf6e88fb4f461 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Wed, 12 Sep 2018 12:30:39 +0000 Subject: [PATCH] Fix --- commands/image-edit/nike-ad.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/image-edit/nike-ad.js b/commands/image-edit/nike-ad.js index 12027ea8..28301dfa 100644 --- a/commands/image-edit/nike-ad.js +++ b/commands/image-edit/nike-ad.js @@ -65,8 +65,8 @@ module.exports = class NikeAdCommand extends Command { const lines = wrapText(ctx, `Believe in ${something}. Even if it means ${sacrifice}.`, data.width); const initial = data.height / 2; for (let i = 0; i < lines.length; i++) { - const height = initial + (i * fontSize) + (i * 10); - ctx.fillText(lines[i], data.width / 2, height); + const textHeight = initial + (i * fontSize) + (i * 10); + ctx.fillText(lines[i], data.width / 2, textHeight); } const attachment = canvas.toBuffer(); if (Buffer.byteLength(attachment) > 8e+6) return msg.reply('Resulting image was above 8 MB.');