Process of format fixing

This commit is contained in:
2024-01-19 21:36:01 +01:00
parent ee217d5f64
commit 3eed20e788
77 changed files with 1079 additions and 1086 deletions

View File

@@ -48,8 +48,8 @@ async function getPlayer(uuid: string): Promise<PlayerData | null> {
const playerReq: Player = await fetch(hypixel, {
params: {
key: apikey,
uuid: uuid,
},
uuid: uuid
}
})
if (!playerReq.data.player) {
@@ -61,15 +61,15 @@ async function getPlayer(uuid: string): Promise<PlayerData | null> {
async function getGuild(
query: string,
type?: GuildQuerqType,
type?: GuildQuerqType
): Promise<GuildData | null> {
const reqType = type ? type : "player"
const guildReq: Guild = await fetch(guild, {
params: {
key: apikey,
[reqType]: query,
},
[reqType]: query
}
})
if (!guildReq.data.guild) {

View File

@@ -4,7 +4,7 @@
function guildLevel(exp: number): number {
const EXP_NEEDED = [
100000, 150000, 250000, 500000, 750000, 1000000, 1250000, 1500000,
2000000, 2500000, 2500000, 2500000, 2500000, 2500000, 3000000,
2000000, 2500000, 2500000, 2500000, 2500000, 2500000, 3000000
]
let level = 0

View File

@@ -12,7 +12,7 @@ function getLevel(exp: number): number {
if (exp <= 1) return 1
return Math.floor(
1 + REVERSE_PQ_PREFIX + Math.sqrt(REVERSE_CONST + GROWTHDIV2 * exp),
1 + REVERSE_PQ_PREFIX + Math.sqrt(REVERSE_CONST + GROWTHDIV2 * exp)
)
}