From d1e256301ccfb16b6a6cb0567d083194a14c71fc Mon Sep 17 00:00:00 2001 From: dragonfire535 Date: Sat, 11 Mar 2017 19:50:00 -0500 Subject: [PATCH] Add Error Catching to Yoda --- commands/textedit/yoda.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/textedit/yoda.js b/commands/textedit/yoda.js index 3e760957..aa23fc42 100644 --- a/commands/textedit/yoda.js +++ b/commands/textedit/yoda.js @@ -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!");