aboutsummaryrefslogtreecommitdiff
path: root/src/cleaners/skyblock/profiles.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/cleaners/skyblock/profiles.ts')
-rw-r--r--src/cleaners/skyblock/profiles.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/cleaners/skyblock/profiles.ts b/src/cleaners/skyblock/profiles.ts
index 4e9400b..da40ee3 100644
--- a/src/cleaners/skyblock/profiles.ts
+++ b/src/cleaners/skyblock/profiles.ts
@@ -5,6 +5,7 @@ import {
cleanSkyblockProfileResponse
} from './profile.js'
import typedHypixelApi from 'typed-hypixel-api'
+import { ApiOptions } from '../../hypixel.js'
export function cleanPlayerSkyblockProfiles(rawProfiles: HypixelPlayerStatsSkyBlockProfiles | undefined): CleanBasicProfile[] {
if (!rawProfiles) return []
@@ -20,12 +21,15 @@ export function cleanPlayerSkyblockProfiles(rawProfiles: HypixelPlayerStatsSkyBl
}
/** Convert an array of raw profiles into clean profiles */
-export async function cleanSkyblockProfilesResponse(data: typedHypixelApi.SkyBlockProfilesResponse['profiles']): Promise<CleanFullProfile[] | null> {
+export async function cleanSkyblockProfilesResponse(
+ data: typedHypixelApi.SkyBlockProfilesResponse['profiles'],
+ options: ApiOptions
+): Promise<CleanFullProfile[] | null> {
if (!data) return null
const promises: Promise<CleanFullProfile | null>[] = []
for (const profile of data) {
- promises.push(cleanSkyblockProfileResponse(profile))
+ promises.push(cleanSkyblockProfileResponse(profile, options))
}
const cleanedProfiles: CleanFullProfile[] = (await Promise.all(promises)).filter((p): p is CleanFullProfile => p !== null)
return cleanedProfiles