diff --git a/commands/compare-rating.js b/commands/compare-rating.js index 75847b4..57a7943 100644 --- a/commands/compare-rating.js +++ b/commands/compare-rating.js @@ -43,15 +43,15 @@ module.exports = { ]).toArray(); let comp; - if (discord) comp = leaderboard.find(s => s.discordID = discord); + if (discord) comp = leaderboard.find(s => s.discordID == discord); if (gamertag) comp = leaderboard.find(s => s.gamertag == gamertag); let self = leaderboard.find(s => s.discordID == interaction.member.user.id); if (!client.exists(comp)) return interaction.send({ embeds: [new EmbedBuilder().setColor(client.config.Colors.Yellow).setDescription(`**Not Found** Unable to find any records with the gamertag or user provided.`)] }); if (!client.exists(self)) return interaction.send({ embeds: [new EmbedBuilder().setColor(client.config.Colors.Yellow).setDescription(`**Not Found** You haven't linked your gamertag and your stats cannot be found.`)] }); - let lbPosSelf = leaderboard.indexOf(self); - let lbPosComp = leaderboard.indexOf(comp); + let lbPosSelf = leaderboard.indexOf(self) + 1; + let lbPosComp = leaderboard.indexOf(comp) + 1; let selfData = self.combatRatingHistory; let compData = comp.combatRatingHistory; diff --git a/package.json b/package.json index edac371..6c2d50d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dayzr-bot", - "version": "12.4.3", + "version": "12.4.4", "description": "A General Purpose Discord Bot for DayZ Nitrado Servers.", "main": "index.js", "nodemonConfig": {