Added duels wlr to stat check

This commit is contained in:
2023-08-06 11:21:52 +02:00
parent 01dc7f9673
commit d36ac507de
2 changed files with 19 additions and 24 deletions

View File

@@ -1,7 +1,5 @@
const { SlashCommandBuilder, EmbedBuilder, PermissionFlagsBits } =
require("discord.js");
const { bwfdkr, bwstars, bwwins, duelswins, swstars } =
require("../config/reqs.json");
const { SlashCommandBuilder, EmbedBuilder, PermissionFlagsBits } = require("discord.js");
const { bwfkdr, bwstars, bwwins, swstars, duelswins, duelswlr } = require("../config/reqs.json");
const env = require("dotenv").config();
const hypixelApiKey = process.env.HYPIXELAPIKEY;
const { color } = require("../config/options.json");
@@ -127,7 +125,7 @@ module.exports = {
const hypixelExp = stats.data.player.networkExp;
const level = getExactLevel(hypixelExp);
if (hsbwstars < bwstars || hsbwfkdr < bwfdkr || hsbwwins < bwwins) {
if (hsbwstars < bwstars || hsbwfkdr < bwfkdr || hsbwwins < bwwins) {
var bwtitle =
"<a:cross_a:1087808606897983539> This player does not meet the BedWars requirements.";
} else {
@@ -143,7 +141,7 @@ module.exports = {
"<a:check_a:1087808632172847134> This player meets the SkyWars requirements.";
}
if (hsduelswins < duelswins) {
if (hsduelswins < duelswins || hsduelswlr < duelswlr) {
var duelstitle =
"<a:cross_a:1087808606897983539> This player does not meet the Duels requirements.";
} else {
@@ -171,7 +169,7 @@ module.exports = {
bwstars.toString() + "`\n" +
"**➺ FKDR:** `" +
hsbwfkdr.toFixed(2).toString() +
" / " + bwfdkr.toString() + "`\n" +
" / " + bwfkdr.toString() + "`\n" +
"**➺ Wins:** `" +
hsbwwins.toString() + " / " +
bwwins.toString() + "`"
@@ -193,12 +191,11 @@ module.exports = {
value: "**➺ Wins:** `" +
hsduelswins.toString() +
" / " + duelswins.toString() + "`\n" +
"**➺ KDR:** `" +
hsduelskd.toFixed(2).toString() +
"`\n" +
"**➺ WLR:** `" +
hsduelswlr.toFixed(2).toString() +
"`"
"**➺ WLR:** `" +
hsduelswlr.toFixed(2).toString() +
" / " + duelswlr.toString() + "`\n" +
"**➺ KDR:** `" +
hsduelskd.toFixed(2).toString() + "`"
}
]
}]