Updated and cleaned up files
This commit is contained in:
@@ -3,7 +3,7 @@ const fetch = require('axios');
|
||||
const guildapp = require('../../schemas/guildAppSchema.js');
|
||||
const { bwfkdr, bwstars, bwwins, swstars, duelswins, duelswlr } = require('../../config/reqs.json');
|
||||
const hypixelApiKey = process.env.HYPIXELAPIKEY;
|
||||
const { getExactLevel, skywarsLevel, getLevelForExp } = require("../../utils/functions.js");
|
||||
const { hypixelLevel, bedwarsLevel, skywarsLevel } = require("../../utils/utils.js");
|
||||
|
||||
module.exports = {
|
||||
name: 'checkstats',
|
||||
@@ -80,7 +80,7 @@ module.exports = {
|
||||
|
||||
//bedwars level
|
||||
const hsbwexp = stats.data.player.stats.Bedwars.Experience;
|
||||
const hsbwstars = getLevelForExp(hsbwexp);
|
||||
const hsbwstars = bedwarsLevel(hsbwexp);
|
||||
// bedwars fkdr
|
||||
const hsbwfk = stats.data.player.stats.Bedwars.final_kills_bedwars;
|
||||
const hsbwfd = stats.data.player.stats.Bedwars.final_deaths_bedwars;
|
||||
@@ -107,7 +107,7 @@ module.exports = {
|
||||
const hsduelswlr = hsduelswins / hsduelslosses;
|
||||
// network level
|
||||
const hypixelExp = stats.data.player.networkExp;
|
||||
const level = getExactLevel(hypixelExp);
|
||||
const level = hypixelLevel(hypixelExp);
|
||||
|
||||
if (hsbwstars < bwstars || hsbwfkdr < bwfkdr || hsbwwins < bwwins) {
|
||||
var bwtitle = "<a:cross_a:1087808606897983539> This player does not meet the BedWars requirements."
|
||||
|
||||
Reference in New Issue
Block a user