fix/compare combat rating
This commit is contained in:
2 files changed
+4
-7
No files matched your search
@@ -53,9 +53,6 @@ module.exports = {
|
|||||||
let lbPosSelf = leaderboard.indexOf(self);
|
let lbPosSelf = leaderboard.indexOf(self);
|
||||||
let lbPosComp = leaderboard.indexOf(comp);
|
let lbPosComp = leaderboard.indexOf(comp);
|
||||||
|
|
||||||
let tag = !gamertag && discord ? `<@${discord}>` :
|
|
||||||
!discord && gamertag ? `**${gamertag}**` : `N/A Error`;
|
|
||||||
|
|
||||||
let selfData = self.combatRatingHistory;
|
let selfData = self.combatRatingHistory;
|
||||||
let compData = comp.combatRatingHistory;
|
let compData = comp.combatRatingHistory;
|
||||||
if (selfData.length == 1) selfData.push(self.combatRating) // Make array 2 long for a straight line in the graph
|
if (selfData.length == 1) selfData.push(self.combatRating) // Make array 2 long for a straight line in the graph
|
||||||
@@ -70,9 +67,9 @@ module.exports = {
|
|||||||
.setColor(client.config.Colors.Default)
|
.setColor(client.config.Colors.Default)
|
||||||
.setDescription(`<@${interaction.member.user.id}> vs ${tag} Combat Rating`)
|
.setDescription(`<@${interaction.member.user.id}> vs ${tag} Combat Rating`)
|
||||||
.addFields(
|
.addFields(
|
||||||
{ name: `<@${interaction.member.user.id}> Combat Rating Stats`, value: `Leaderboard Pos: # ${lbPosSelf}\nRating: ${self.combatRating}`, inline: true },
|
{ name: `${self.gamertag}'s Combat Rating Stats`, value: `> Leaderboard Pos: # ${lbPosSelf}\n> Rating: ${self.combatRating}`, inline: false },
|
||||||
{ name: `${tag} Combat Rating Stats`, value: `Leaderboard Pos: # ${lbPosComp}\nRating: ${self.combatRating}`, inline: true },
|
{ name: `${comp.gamertag}'s Combat Rating Stats`, value: `> Leaderboard Pos: # ${lbPosComp}\n> Rating: ${self.combatRating}`, inline: false },
|
||||||
{ name: 'Rating Difference', value: `${Math.abs(self.combatRating - comp.combatRating)}`, inline: true },
|
{ name: 'Rating Difference', value: `${Math.abs(self.combatRating - comp.combatRating)}`, inline: false },
|
||||||
);
|
);
|
||||||
|
|
||||||
const dataMax = Math.max(selfDataMax, compDataMax);
|
const dataMax = Math.max(selfDataMax, compDataMax);
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "dayzr-bot",
|
"name": "dayzr-bot",
|
||||||
"version": "12.4.1",
|
"version": "12.4.2",
|
||||||
"description": "A General Purpose Discord Bot for DayZ Nitrado Servers.",
|
"description": "A General Purpose Discord Bot for DayZ Nitrado Servers.",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"nodemonConfig": {
|
"nodemonConfig": {
|
||||||
|
|||||||
Reference in new issue
Block a user