From 986e503b1ab012ab55b5f8d71ba7754610f5ebc8 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sat, 4 Jul 2020 23:13:48 -0400 Subject: [PATCH] Fix --- commands/edit-image/gandhi-quote.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/edit-image/gandhi-quote.js b/commands/edit-image/gandhi-quote.js index 4d66f3c8..cb95a16d 100644 --- a/commands/edit-image/gandhi-quote.js +++ b/commands/edit-image/gandhi-quote.js @@ -44,7 +44,7 @@ module.exports = class GandhiQuoteCommand extends Command { }); } - async run(msg, { text }) { + async run(msg, { quote }) { const base = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'gandhi-quote.png')); const canvas = createCanvas(base.width, base.height); const ctx = canvas.getContext('2d'); @@ -58,7 +58,7 @@ module.exports = class GandhiQuoteCommand extends Command { fontSize--; ctx.font = `${fontSize}px Noto`; } - const lines = await wrapText(ctx, text, 270); + const lines = await wrapText(ctx, quote, 270); const topMost = 180 - (((fontSize * lines.length) / 2) + ((20 * (lines.length - 1)) / 2)); for (let i = 0; i < lines.length; i++) { const height = topMost + ((fontSize + 20) * i);