diff options
Diffstat (limited to 'build/cleaners')
-rw-r--r-- | build/cleaners/skyblock/member.js | 3 | ||||
-rw-r--r-- | build/cleaners/skyblock/profile.js | 4 | ||||
-rw-r--r-- | build/cleaners/skyblock/profiles.js | 3 |
3 files changed, 7 insertions, 3 deletions
diff --git a/build/cleaners/skyblock/member.js b/build/cleaners/skyblock/member.js index 8b922a5..2e07f39 100644 --- a/build/cleaners/skyblock/member.js +++ b/build/cleaners/skyblock/member.js @@ -43,6 +43,7 @@ async function cleanSkyBlockProfileMemberResponseBasic(member, included = null) exports.cleanSkyBlockProfileMemberResponseBasic = cleanSkyBlockProfileMemberResponseBasic; /** Cleans up a member (from skyblock/profile) */ async function cleanSkyBlockProfileMemberResponse(member, included = null) { + var _a; // profiles.members[] const inventoriesIncluded = included == null || included.includes('inventories'); const player = await cached.fetchPlayer(member.uuid); @@ -54,6 +55,8 @@ async function cleanSkyBlockProfileMemberResponse(member, included = null) { rank: player.rank, purse: member.coin_purse, stats: stats_1.cleanProfileStats(member), + // this is used for leaderboards + rawHypixelStats: (_a = member.stats) !== null && _a !== void 0 ? _a : {}, minions: minions_1.cleanMinions(member), fairy_souls: fairysouls_1.cleanFairySouls(member), inventories: inventoriesIncluded ? await inventory_1.cleanInventories(member) : undefined, diff --git a/build/cleaners/skyblock/profile.js b/build/cleaners/skyblock/profile.js index 2b18ff8..fe1161e 100644 --- a/build/cleaners/skyblock/profile.js +++ b/build/cleaners/skyblock/profile.js @@ -25,12 +25,12 @@ exports.cleanSkyblockProfileResponseLighter = cleanSkyblockProfileResponseLighte /** * This function is somewhat costly and shouldn't be called often. Use cleanSkyblockProfileResponseLighter if you don't need all the data */ -async function cleanSkyblockProfileResponse(data, { mainMemberUuid }) { +async function cleanSkyblockProfileResponse(data, options) { const cleanedMembers = []; for (const memberUUID in data.members) { const memberRaw = data.members[memberUUID]; memberRaw.uuid = memberUUID; - const member = await member_1.cleanSkyBlockProfileMemberResponse(memberRaw, ['stats', mainMemberUuid === memberUUID ? 'inventories' : undefined]); + const member = await member_1.cleanSkyBlockProfileMemberResponse(memberRaw, ['stats', (options === null || options === void 0 ? void 0 : options.mainMemberUuid) === memberUUID ? 'inventories' : undefined]); cleanedMembers.push(member); } const memberMinions = []; diff --git a/build/cleaners/skyblock/profiles.js b/build/cleaners/skyblock/profiles.js index b4eb07b..029110a 100644 --- a/build/cleaners/skyblock/profiles.js +++ b/build/cleaners/skyblock/profiles.js @@ -17,7 +17,8 @@ exports.cleanPlayerSkyblockProfiles = cleanPlayerSkyblockProfiles; async function cleanSkyblockProfilesResponse(data) { const cleanedProfiles = []; for (const profile of data !== null && data !== void 0 ? data : []) { - let cleanedProfile = await profile_1.cleanSkyblockProfileResponseLighter(profile); + // let cleanedProfile = await cleanSkyblockProfileResponseLighter(profile) + let cleanedProfile = await profile_1.cleanSkyblockProfileResponse(profile); cleanedProfiles.push(cleanedProfile); } return cleanedProfiles; |