fix/compare combat rating
This commit is contained in:
2 files changed
+4
-4
No files matched your search
@@ -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;
|
||||
|
||||
+1
-1
@@ -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": {
|
||||
|
||||
Reference in new issue
Block a user