aboutsummaryrefslogtreecommitdiff
path: root/src/cleaners/skyblock
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-03-27 19:43:05 -0500
committermat <github@matdoes.dev>2022-03-27 19:43:05 -0500
commit5a08829b7b6f711a1ffe19ed3e2cd724c54e7b2b (patch)
tree84de1955339075cdc69e21122d7ac18557581649 /src/cleaners/skyblock
parent0a31ac6943aef19fbc63b25163ecb3b4a3c9f81b (diff)
downloadskyblock-api-5a08829b7b6f711a1ffe19ed3e2cd724c54e7b2b.tar.gz
skyblock-api-5a08829b7b6f711a1ffe19ed3e2cd724c54e7b2b.tar.bz2
skyblock-api-5a08829b7b6f711a1ffe19ed3e2cd724c54e7b2b.zip
Fix first join & add last save leaderboard
Diffstat (limited to 'src/cleaners/skyblock')
-rw-r--r--src/cleaners/skyblock/member.ts16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/cleaners/skyblock/member.ts b/src/cleaners/skyblock/member.ts
index 2acbd26..c7c9a2e 100644
--- a/src/cleaners/skyblock/member.ts
+++ b/src/cleaners/skyblock/member.ts
@@ -22,8 +22,8 @@ import { CleanRank } from '../rank.js'
export interface CleanBasicMember {
uuid: string
username: string
- lastSave: number
- firstJoin: number
+ lastSave: number | null
+ firstJoin: number | null
rank: CleanRank
left?: boolean
}
@@ -53,8 +53,8 @@ export async function cleanSkyBlockProfileMemberResponseBasic(member: typedHypix
return {
uuid: member.uuid,
username: player.username,
- lastSave: member.last_save ?? 0,
- firstJoin: member.first_join ?? 0,
+ lastSave: member.last_save ?? null,
+ firstJoin: member.first_join ?? null,
rank: player.rank
}
}
@@ -74,8 +74,8 @@ export async function cleanSkyBlockProfileMemberResponse(member: typedHypixelApi
uuid: member.uuid,
username: player.username,
// members that haven't joined the profile have no last save or first join
- lastSave: member.last_save ?? 0,
- firstJoin: member.first_join ?? 0,
+ lastSave: member.last_save ?? null,
+ firstJoin: member.first_join ?? null,
rank: player.rank,
purse: member.coin_purse ?? 0,
@@ -105,8 +105,8 @@ export async function cleanSkyBlockProfileMemberResponse(member: typedHypixelApi
export interface CleanMemberProfilePlayer extends CleanPlayer {
// The profile name may be different for each player, so we put it here
profileName: string
- firstJoin: number
- lastSave: number
+ firstJoin: number | null
+ lastSave: number | null
purse: number
stats: StatItem[]
rawHypixelStats: { [key: string]: number }