From f27fc2fae637f5250d6319a343a1e16803a857d2 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Mon, 6 Aug 2018 15:25:20 -0400 Subject: [PATCH] Fix --- commands/image-edit/to-be-continued.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/commands/image-edit/to-be-continued.js b/commands/image-edit/to-be-continued.js index c6b86d2a..2d2ad30b 100644 --- a/commands/image-edit/to-be-continued.js +++ b/commands/image-edit/to-be-continued.js @@ -38,7 +38,8 @@ module.exports = class ToBeContinuedCommand extends Command { sepia(ctx, 0, 0, data.width, data.height); const ratio = base.width / base.height; const width = canvas.width / 2; - ctx.drawImage(base, canvas.width - base.width, canvas.height - base.height, width, Math.round(width / ratio)); + const height = Math.round(width / ratio); + ctx.drawImage(base, canvas.width - width, canvas.height - height, width, height); const attachment = canvas.toBuffer(); if (Buffer.byteLength(attachment) > 8e+6) return msg.reply('Resulting image was above 8 MB.'); return msg.say({ files: [{ attachment, name: 'to-be-continued.png' }] });