diff options
author | mat <github@matdoes.dev> | 2022-05-20 20:46:09 -0500 |
---|---|---|
committer | mat <github@matdoes.dev> | 2022-05-20 20:46:09 -0500 |
commit | 1590406fdc3ce3d31b3f9f1b45d0bbf4ad07af31 (patch) | |
tree | 3c25062503e004603eefd83494bea660d69710ac | |
parent | 3ee66da4a46138d00208f6ba65aedc999e2b4237 (diff) | |
download | skyblock-api-1590406fdc3ce3d31b3f9f1b45d0bbf4ad07af31.tar.gz skyblock-api-1590406fdc3ce3d31b3f9f1b45d0bbf4ad07af31.tar.bz2 skyblock-api-1590406fdc3ce3d31b3f9f1b45d0bbf4ad07af31.zip |
rename onetime achievements to challenge
-rw-r--r-- | src/cleaners/achievements.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/cleaners/achievements.ts b/src/cleaners/achievements.ts index 3e4189a..2e75cc6 100644 --- a/src/cleaners/achievements.ts +++ b/src/cleaners/achievements.ts @@ -8,7 +8,7 @@ interface TieredAchievement { description: string } -interface OneTimeAchievement { +interface ChallengeAchievement { id: string name: string achieved: boolean @@ -17,7 +17,7 @@ interface OneTimeAchievement { export interface Achievements { tiered: TieredAchievement[] - oneTime: OneTimeAchievement[] + challenge: ChallengeAchievement[] } export async function cleanPlayerAchievements(data: typedHypixelApi.PlayerDataResponse['player']): Promise<Achievements> { @@ -38,9 +38,9 @@ export async function cleanPlayerAchievements(data: typedHypixelApi.PlayerDataRe }) } - let oneTimeAchievements: OneTimeAchievement[] = [] + let challengeAchievements: ChallengeAchievement[] = [] for (const [achievementId, achievementData] of Object.entries(achievementsData.one_time)) { - oneTimeAchievements.push({ + challengeAchievements.push({ id: achievementId.toLowerCase(), name: achievementData.name, achieved: data.achievementsOneTime.includes(`skyblock_${achievementId.toLowerCase()}`), @@ -48,10 +48,10 @@ export async function cleanPlayerAchievements(data: typedHypixelApi.PlayerDataRe }) } - return { tiered: tieredAchievements, oneTime: oneTimeAchievements } + return { tiered: tieredAchievements, challenge: challengeAchievements } } // this shouldn't be possible console.debug('skyblock not found in achievements?') - return { tiered: [], oneTime: [] } + return { tiered: [], challenge: [] } } |