From f1a19d4c503cc12d1ef600f3e9cb1a6fb95dc7d7 Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Sun, 16 May 2021 09:10:01 -0500 Subject: [PATCH] Attempt to fix catch blocks always replying with errors --- bot/awesomescibo.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot/awesomescibo.js b/bot/awesomescibo.js index 69aab37..d7bc040 100755 --- a/bot/awesomescibo.js +++ b/bot/awesomescibo.js @@ -243,9 +243,9 @@ function training(subject, interaction) { }).catch(console.error); }).catch(console.error); } - }).catch(error => if (error) interaction.editReply("Sorry, the question timed out waiting for an answer.")); + }).catch(error => { if (error) interaction.editReply("Sorry, the question timed out waiting for an answer.") }); }).catch(console.error); - }).catch(error => if (error) interaction.reply("Sorry, there was a problem fetching the question. Please try again!")); + }).catch(error => { if (error) interaction.reply("Sorry, there was a problem fetching the question. Please try again!") }); } function sendHelpMessage(interaction) {