From 985b94789daabbcad373f36241626d69fc784f00 Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Sat, 1 May 2021 23:22:42 -0500 Subject: [PATCH] Fix formatting --- bot/awesomescibo.js | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/bot/awesomescibo.js b/bot/awesomescibo.js index 792a554..e6fecba 100755 --- a/bot/awesomescibo.js +++ b/bot/awesomescibo.js @@ -313,7 +313,6 @@ async function generateRound(message) { } }); let i; - let generatingMsg = await message.channel.send("Generating..."); for (i = 1; i < 26; i++) { let tossup_question; let question_category; @@ -356,19 +355,17 @@ async function generateRound(message) { bonus_answer + "

"; htmlContent = htmlContent.replace(/\n/g, "
"); - newGeneratedRound = new generatedRound({ - htmlContent: htmlContent, - requestedBy: message.author.tag, - }); - newGeneratedRound.save((err) => - err - ? console.log("Error creating saving generated round content") - : console.log("Sucessfully created new entry for the generated round") - ); - }); - if (generatingMsg) { - generatingMsg.delete({ timeout: 100 }).catch(console.error); + }); } + newGeneratedRound = new generatedRound({ + htmlContent: htmlContent, + requestedBy: message.author.tag, + }); + newGeneratedRound.save((err) => + err + ? console.log("Error creating saving generated round content") + : console.log("Sucessfully created new entry for the generated round") + ); message.channel.send("Check database"); }