From 2b6145863ff3e12abe7b91992aed8594446da4fd Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Sun, 2 May 2021 00:29:05 -0500 Subject: [PATCH] Improve error logging --- bot/awesomescibo.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bot/awesomescibo.js b/bot/awesomescibo.js index b6def1a..ba60b67 100755 --- a/bot/awesomescibo.js +++ b/bot/awesomescibo.js @@ -339,10 +339,10 @@ async function generateRound(message) { requestedBy: message.author.id, }); newGeneratedRound.save((err, round) => - err - ? console.log("Error creating saving generated round content") - : console.log("Sucessfully created new entry for the generated round") - + if (err) { + console.log(err); + return; + } message.channel.fetch(generatingMessage.id).edit(`https://api.adawesome.tech/round/${round._id.toString()}`); ); }