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}` }] });