From 443d3efaa6da8764834a1070242c1772fcbefcb2 Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Sat, 15 May 2021 20:13:55 -0500 Subject: [PATCH] Add hits to rounds command --- bot/awesomescibo.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bot/awesomescibo.js b/bot/awesomescibo.js index 07d53c3..6c0fe2f 100755 --- a/bot/awesomescibo.js +++ b/bot/awesomescibo.js @@ -433,6 +433,11 @@ async function rounds(action, interaction) { embeds: [roundsEmbed], ephemeral: true }); + } else if (action === "hit"){ + let totalCount = await generatedRound.countDocuments({}); + let userCount = await generatedRound.countDocuments({ requestedBy: interaction.author.id }); + + interaction.reply(`Total Hits: ${totalCount}\nYour Hits: ${userCount}`); } } @@ -492,9 +497,6 @@ client.on("message", async (message) => { case "dobeabout": // Show about message of bot aboutMessage(message); break; - case "dobehits": - hits(message); - break; case "dobechangelog": changelog(message); break;