Browse Source

Re-add hits command by using .count()

pull/9/head
Abheek Dhawan 4 years ago
parent
commit
fe1212c82c
  1. 10
      bot/awesomescibo.js

10
bot/awesomescibo.js

@ -493,6 +493,13 @@ async function userRounds(message) {
message.channel.send(roundsEmbed);
}
async function hits(message) {
let totalCount = await generatedRound.count({});
let userCount = await generatedRound.count({ requestedBy: message.author.id });
message.channel.send(`Total Hits: ${totalCount}\nYour Hits: ${userCount}`);
}
client.on("message", async (message) => {
if (message.author.bot) {
return;
@ -532,6 +539,9 @@ client.on("message", async (message) => {
case "dobemyrounds":
userRounds(message);
break;
case "dobehits":
hits(message);
break;
default:
// Do be training
otherCommands(message);

Loading…
Cancel
Save