aboutsummaryrefslogtreecommitdiff
path: root/src/cleaners/player.ts
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2021-02-20 22:41:31 -0600
committermat <27899617+mat-1@users.noreply.github.com>2021-02-20 22:41:31 -0600
commit892cb58ceddb2009f6c1c32ad75e1a7bec5ea06f (patch)
tree86dd519078e489994009162824e575f47b7ffd9e /src/cleaners/player.ts
parent74c078392c46405a8432309c8672dc09642956d6 (diff)
downloadskyblock-api-892cb58ceddb2009f6c1c32ad75e1a7bec5ea06f.tar.gz
skyblock-api-892cb58ceddb2009f6c1c32ad75e1a7bec5ea06f.tar.bz2
skyblock-api-892cb58ceddb2009f6c1c32ad75e1a7bec5ea06f.zip
add "first_join" to `player`
Diffstat (limited to 'src/cleaners/player.ts')
-rw-r--r--src/cleaners/player.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cleaners/player.ts b/src/cleaners/player.ts
index f4cbb18..d23fe29 100644
--- a/src/cleaners/player.ts
+++ b/src/cleaners/player.ts
@@ -14,6 +14,7 @@ export interface CleanPlayer extends CleanBasicPlayer {
rank: CleanRank
socials: CleanSocialMedia
profiles?: CleanBasicProfile[]
+ first_join: number
}
export async function cleanPlayerResponse(data: HypixelPlayer): Promise<CleanPlayer> {
@@ -23,6 +24,7 @@ export async function cleanPlayerResponse(data: HypixelPlayer): Promise<CleanPla
username: data.displayname,
rank: cleanRank(data),
socials: cleanSocialMedia(data),
+ first_join: data.firstLogin / 1000,
profiles: cleanPlayerSkyblockProfiles(data.stats?.SkyBlock?.profiles)
}
}