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": {