mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-14 08:08:34 +02:00
Fix for Yoda
This commit is contained in:
@@ -29,10 +29,8 @@ module.exports = class YodaCommand extends commando.Command {
|
|||||||
.then(function (response) {
|
.then(function (response) {
|
||||||
if(response === undefined) {
|
if(response === undefined) {
|
||||||
message.channel.send(':x: Error! Something went wrong! Keep it simple to avoid this error.');
|
message.channel.send(':x: Error! Something went wrong! Keep it simple to avoid this error.');
|
||||||
console.log(response.body);
|
|
||||||
} else {
|
} else {
|
||||||
console.log(response);
|
message.channel.send(response.text).catch(error => message.channel.send(':x: Error! Something went wrong! Keep it simple to avoid this error.'));
|
||||||
message.channel.send(response).catch(error => message.channel.send(':x: Error! Something went wrong! Keep it simple to avoid this error.'));
|
|
||||||
}
|
}
|
||||||
}).catch(function (err) {
|
}).catch(function (err) {
|
||||||
message.channel.send(":x: Error! Unknown Error. Try again later!");
|
message.channel.send(":x: Error! Unknown Error. Try again later!");
|
||||||
|
|||||||
Reference in New Issue
Block a user