mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +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.');
|
||||
} else {
|
||||
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) {
|
||||
message.channel.sendMessage(":x: Error!");
|
||||
|
||||
Reference in New Issue
Block a user