From 3d4d9e51880aa665541e335bcd5dfa8c9bce2299 Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 9 Apr 2022 13:19:20 -0500 Subject: return whole player in coopInvitation --- src/cleaners/skyblock/member.ts | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'src/cleaners/skyblock/member.ts') diff --git a/src/cleaners/skyblock/member.ts b/src/cleaners/skyblock/member.ts index 9306c59..9231456 100644 --- a/src/cleaners/skyblock/member.ts +++ b/src/cleaners/skyblock/member.ts @@ -72,6 +72,14 @@ export async function cleanSkyBlockProfileMemberResponse(member: typedHypixelApi if (fairySouls.total > (maxFairySouls ?? 0)) await constants.setConstantValues({ max_fairy_souls: fairySouls.total }) + const coopInvitationPromise = cleanCoopInvitation(member) + const minionsPromise = cleanMinions(member) + const skillsPromise = cleanSkills(member) + const zonesPromise = cleanVisitedZones(member) + const petsPromise = cleanPets(member) + const harpPromise = cleanHarp(member) + const inventoriesPromise = inventoriesIncluded ? cleanInventories(member) : Promise.resolve(undefined) + return { uuid: member.uuid, username: player.username, @@ -87,17 +95,17 @@ export async function cleanSkyBlockProfileMemberResponse(member: typedHypixelApi // this is used for leaderboards rawHypixelStats: member.stats ?? {}, - minions: await cleanMinions(member), + minions: await minionsPromise, fairySouls: fairySouls, - inventories: inventoriesIncluded ? await cleanInventories(member) : undefined, + inventories: inventoriesPromise ? await inventoriesPromise : undefined, objectives: cleanObjectives(member), - skills: await cleanSkills(member), - zones: await cleanVisitedZones(member), + skills: await skillsPromise, + zones: await zonesPromise, collections: cleanCollections(member), slayers: cleanSlayers(member), - pets: await cleanPets(member), - harp: await cleanHarp(member), - coopInvitation: cleanCoopInvitation(member), + pets: await petsPromise, + harp: await harpPromise, + coopInvitation: await coopInvitationPromise, farmingContests: cleanFarmingContests(member), left: (player.profiles?.find(profile => profile.uuid === profileId) === undefined) ?? false -- cgit