Make Yoda Errors Cooler

This commit is contained in:
Daniel Odendahl Jr
2017-08-30 12:39:53 +00:00
parent fac48bdda9
commit 69af4e712f
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -31,9 +31,10 @@ module.exports = class YodaCommand extends Command {
.get('https://yoda.p.mashape.com/yoda')
.query({ sentence })
.set({ 'X-Mashape-Key': MASHAPE_KEY });
if (!text) return msg.say('Empty, this message is. Try again later, you must.');
return msg.say(text);
} catch (err) {
return msg.say(`Oh no, Yoda's being a jerk and not working again: \`${err.message}\`. Try again later!`);
return msg.say(`Being a jerk again, Yoda is: \`${err.message}\`. Try again later, you must.`);
}
}
};
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiaobot",
"version": "33.0.2",
"version": "33.0.3",
"description": "Your personal server companion.",
"main": "Shard.js",
"scripts": {