fix/bounties length

This commit is contained in:
SowinskiBraeden committed 2023-11-06 17:58:28 -08:00
1 parent 9d44dcf158
commit 95ec4c5f1e
3 files changed
+4 -4

No files matched your search

+2 -3
View File
@@ -104,7 +104,7 @@ module.exports = {
setBy: (anonymous && !anonymous.value) ? interaction.member.user.id : null,
value: args[0].options[1].value,
});
playerStat.bountiesLength++;
playerStat.bountiesLength = playerStat.bounties.length; // Will ensure bounties length = # of bounties, even if bountiesLength does not exists in player stat.
await UpdatePlayer(client, playerStat, interaction);
@@ -160,10 +160,9 @@ module.exports = {
} else if (args[0].name == 'view') {
// TODO: only get players with boutnies.length greater than 0
const activeBounties = await client.dbo.collection("players").find({
"bountiesLength": { $gt: 0 }
});
}).toArray();
let bountiesEmbed = new EmbedBuilder()
.setColor(client.config.Colors.Default)