mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-26 22:32:52 +02:00
Add Error Catching to Yoda
This commit is contained in:
@@ -37,7 +37,7 @@ class YodaCommand extends commando.Command {
|
|||||||
message.channel.sendMessage(':x: Error! Something went wrong! Keep it simple to avoid this error.');
|
message.channel.sendMessage(':x: Error! Something went wrong! Keep it simple to avoid this error.');
|
||||||
} else {
|
} else {
|
||||||
let translated = response.split('-').join(" ");
|
let translated = response.split('-').join(" ");
|
||||||
message.channel.sendMessage(translated);
|
message.channel.sendMessage(translated).catch(error => message.channel.sendMessage(':x: Error! Something went wrong! Keep it simple to avoid this error.'));
|
||||||
}
|
}
|
||||||
}).catch(function (err) {
|
}).catch(function (err) {
|
||||||
message.channel.sendMessage(":x: Error!");
|
message.channel.sendMessage(":x: Error!");
|
||||||
|
|||||||
Reference in New Issue
Block a user