From 4fcbe2890cc88600c2ed6cc8bce57e1388bcb091 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Wed, 19 Feb 2020 13:37:47 +0100 Subject: [PATCH] handle when no link is used and added prompt --- commands/images/meme.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/commands/images/meme.js b/commands/images/meme.js index 88b404d..b2a3f64 100644 --- a/commands/images/meme.js +++ b/commands/images/meme.js @@ -13,10 +13,16 @@ class memeCommand extends Command { args: [ { id: 'link', + prompt: { + start: 'Please input a link to use, say `cancel` to stop the command' + }, type: 'string', }, { id: 'message', + prompt: { + start: 'Please input a caption, say `cancel` to stop the command' + }, type: 'string', match: 'rest' } @@ -92,11 +98,10 @@ class memeCommand extends Command { }); }); }); + }) + .catch((err) => { + return message.channel.send(`Please input a correct link \`${err}\``); }); - - - - } }