diff --git a/commands/bounty.js b/commands/bounty.js index 5ecef08..4c4e76f 100644 --- a/commands/bounty.js +++ b/commands/bounty.js @@ -56,8 +56,9 @@ module.exports = { */ run: async (client, interaction, args, { GuildDB }) => { + let banking; if (args[0].name == 'set' || args[0].name == 'pay') { - let banking = await client.dbo.collection("users").findOne({"user.userID": interaction.member.user.id}).then(banking => banking); + banking = await client.dbo.collection("users").findOne({"user.userID": interaction.member.user.id}).then(banking => banking); if (!banking) { banking = { @@ -82,7 +83,6 @@ module.exports = { const success = addUser(banking.guilds, GuildDB.serverID, interaction.member.user.id, client, GuildDB.startingBalance); if (!success) return client.sendInternalError(interaction, 'Failed to add bank'); } - } if (args[0].name == 'set') { diff --git a/package.json b/package.json index c7997a1..f01629d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dayzr-bot", - "version": "9.6.2", + "version": "9.6.3", "description": "A General Purpose Discord Bot for DayZ Nitrado Servers.", "main": "index.js", "nodemonConfig": {