From 28b3cb583524a4634de991993e5a42f85105637b Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Sun, 2 May 2021 22:57:56 +0000 Subject: [PATCH] Use countDocuments as count is deprecated --- bot/awesomescibo.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot/awesomescibo.js b/bot/awesomescibo.js index 4a506a1..67919e9 100755 --- a/bot/awesomescibo.js +++ b/bot/awesomescibo.js @@ -494,8 +494,8 @@ async function userRounds(message) { } async function hits(message) { - let totalCount = await generatedRound.count({}); - let userCount = await generatedRound.count({ requestedBy: message.author.id }); + let totalCount = await generatedRound.countDocuments({}); + let userCount = await generatedRound.countDocuments({ requestedBy: message.author.id }); message.channel.send(`Total Hits: ${totalCount}\nYour Hits: ${userCount}`); }