From a3383e4c15ba339a025269d81af98ba369af7c0d Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sun, 23 May 2021 18:27:05 -0400 Subject: [PATCH] Fix --- commands/edit-image-text/cool-text.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/commands/edit-image-text/cool-text.js b/commands/edit-image-text/cool-text.js index f61ee43e..14e4e479 100644 --- a/commands/edit-image-text/cool-text.js +++ b/commands/edit-image-text/cool-text.js @@ -39,12 +39,13 @@ module.exports = class CoolTextCommand extends Command { async run(msg, { font, text }) { try { - const { body } = await request + const { body, text } = await request .post('https://cooltext.com/PostChange') .attach({ ...fonts[font], Text: text }); + if (!text) return msg.say('Failed to create an image with this text.'); const { body: imageBody } = await request.get(body.renderLocation, { agent: noRejectAgent }); const format = body.isAnimated ? 'gif' : 'png'; return msg.say({ files: [{ attachment: imageBody, name: `${font}.${format}` }] });