From 39210646284cabc89256466646f8ea7834a78d31 Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Tue, 27 Apr 2021 20:02:26 -0500 Subject: Add minion_count leaderboard (#15) * add minion count leaderboard * fix error that happens sometimes * Update index.js --- build/cleaners/skyblock/profile.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'build/cleaners/skyblock/profile.js') diff --git a/build/cleaners/skyblock/profile.js b/build/cleaners/skyblock/profile.js index ef90ce8..ba2c030 100644 --- a/build/cleaners/skyblock/profile.js +++ b/build/cleaners/skyblock/profile.js @@ -31,9 +31,19 @@ async function cleanSkyblockProfileResponse(data, options) { for (const memberUUID in data.members) { const memberRaw = data.members[memberUUID]; memberRaw.uuid = memberUUID; - promises.push(member_1.cleanSkyBlockProfileMemberResponse(memberRaw, ['stats', (options === null || options === void 0 ? void 0 : options.mainMemberUuid) === memberUUID ? 'inventories' : undefined])); + promises.push(member_1.cleanSkyBlockProfileMemberResponse(memberRaw, [ + !(options === null || options === void 0 ? void 0 : options.basic) ? 'stats' : undefined, + (options === null || options === void 0 ? void 0 : options.mainMemberUuid) === memberUUID ? 'inventories' : undefined + ])); } const cleanedMembers = (await Promise.all(promises)).filter(m => m !== null && m !== undefined); + if (options === null || options === void 0 ? void 0 : options.basic) { + return { + uuid: data.profile_id, + name: data.cute_name, + members: cleanedMembers, + }; + } const memberMinions = []; for (const member of cleanedMembers) { memberMinions.push(member.minions); -- cgit