From 6ad00072ec9c7fac533932de8145c80da9a69edd Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Wed, 5 May 2021 18:35:59 +0000 Subject: [PATCH] Fix catch block to log errors --- bot/awesomescibo.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bot/awesomescibo.js b/bot/awesomescibo.js index 3938495..cea9dd9 100755 --- a/bot/awesomescibo.js +++ b/bot/awesomescibo.js @@ -280,7 +280,7 @@ async function otherCommands(message) { ); } }) - .catch((collected) => {}); // Reaction message filter + .catch(console.error); // Reaction message filter }) .catch((collected, error) => { message.reply("\n**ANSWER TIMEOUT**"); @@ -505,8 +505,11 @@ client.on("message", async (message) => { return; } + // Temporary logging purposes + const formattedMessage = message.content.toLowerCase().replace(/ /g, ""); if (formattedMessage.startsWith("dobe")) { + console.log(`${message.author.tag} > ${message.content}`); // Bot prefix is "do be" switch (formattedMessage) { case "dobehelping": // Display help message