mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-15 08:22:37 +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')
|
.get('https://yoda.p.mashape.com/yoda')
|
||||||
.query({ sentence })
|
.query({ sentence })
|
||||||
.set({ 'X-Mashape-Key': MASHAPE_KEY });
|
.set({ 'X-Mashape-Key': MASHAPE_KEY });
|
||||||
|
if (!text) return msg.say('Empty, this message is. Try again later, you must.');
|
||||||
return msg.say(text);
|
return msg.say(text);
|
||||||
} catch (err) {
|
} 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",
|
"name": "xiaobot",
|
||||||
"version": "33.0.2",
|
"version": "33.0.3",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Shard.js",
|
"main": "Shard.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user