mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Make Yoda Errors Cooler
This commit is contained in:
@@ -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
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiaobot",
|
||||
"version": "33.0.2",
|
||||
"version": "33.0.3",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Shard.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user