From 77a7654f1a8604cc3d85a559533c3e9990ce0318 Mon Sep 17 00:00:00 2001 From: Braeden Sowinski Date: Wed, 1 Nov 2023 14:30:19 -0700 Subject: [PATCH] fix/bounty view --- commands/bounty.js | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/commands/bounty.js b/commands/bounty.js index 1696afc..f9223b2 100644 --- a/commands/bounty.js +++ b/commands/bounty.js @@ -143,7 +143,7 @@ module.exports = { const newBalance = banking.guilds[GuildDB.serverID].balance - (totalBounty * 2); - client.dbo.collection("users").updateOne({"user.userID":interaction.member.user.id},{$set:{[`user.guilds.${GuildDB.serverID}.balance`]:newBalance}}, (err, res) => { + await client.dbo.collection("users").updateOne({"user.userID":interaction.member.user.id},{$set:{[`user.guilds.${GuildDB.serverID}.balance`]:newBalance}}, (err, res) => { if (err) return client.sendInternalError(interaction, err); }); @@ -161,7 +161,7 @@ module.exports = { } else if (args[0].name == 'view') { // TODO: only get players with boutnies.length greater than 0 - const activeBounties = await dbo.collection("players").find({ + const activeBounties = await client.dbo.collection("players").find({ "bountiesLength": { $gt: 0 } }); diff --git a/package.json b/package.json index 5782492..df41f50 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dayzr-bot", - "version": "12.1.3", + "version": "12.1.4", "description": "A General Purpose Discord Bot for DayZ Nitrado Servers.", "main": "index.js", "nodemonConfig": {