From f51d2c1a6ea2b00a0b85d049ca5b7fd3af8742aa Mon Sep 17 00:00:00 2001 From: loicbersier Date: Mon, 25 Nov 2019 23:27:11 +0100 Subject: [PATCH] Don't fail silently --- commands/general/tweet.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/commands/general/tweet.js b/commands/general/tweet.js index b7782b0d..ad99a717 100644 --- a/commands/general/tweet.js +++ b/commands/general/tweet.js @@ -102,7 +102,8 @@ class tweetCommand extends Command { T.post('media/upload', { media_data: b64Image }, function (err, data) { if (err) { console.log('OH NO AN ERROR!!!!!!!'); - return console.error(err); + console.error(err); + return message.channel.send('OH NO!!! AN ERROR HAS OCCURED!!! please hold on while i find what\'s causing this issue! '); } else { Tweet(data); } @@ -139,7 +140,8 @@ class tweetCommand extends Command { T.post('statuses/update', options, function (err, response) { if (err) { console.error('OH NO!!!!'); - return console.error(err); + console.error(err); + return message.channel.send('OH NO!!! AN ERROR HAS OCCURED!!! please hold on while i find what\'s causing this issue! '); } const tweetid = response.id_str;