diff options
Diffstat (limited to 'src/hypixel.ts')
-rw-r--r-- | src/hypixel.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/hypixel.ts b/src/hypixel.ts index 8a955ab..395748a 100644 --- a/src/hypixel.ts +++ b/src/hypixel.ts @@ -59,8 +59,8 @@ export interface UserAny { } export interface CleanUser { - player: any - profiles?: any + player: CleanPlayer + profiles?: CleanProfile[] activeProfile?: string online?: boolean } @@ -126,6 +126,9 @@ export async function fetchMemberProfile(user: string, profile: string): Promise const playerUuid = await cached.uuidFromUser(user) const profileUuid = await cached.fetchProfileUuid(user, profile) + // if the profile doesn't have an id, just return + if (!profileUuid) return null + const player = await cached.fetchPlayer(playerUuid) const cleanProfile = await cached.fetchProfile(playerUuid, profileUuid) |