aboutsummaryrefslogtreecommitdiff
path: root/build/cleaners/skyblock/member.js
diff options
context:
space:
mode:
Diffstat (limited to 'build/cleaners/skyblock/member.js')
-rw-r--r--build/cleaners/skyblock/member.js21
1 files changed, 15 insertions, 6 deletions
diff --git a/build/cleaners/skyblock/member.js b/build/cleaners/skyblock/member.js
index 4cd0425..9d10a5e 100644
--- a/build/cleaners/skyblock/member.js
+++ b/build/cleaners/skyblock/member.js
@@ -19,27 +19,36 @@ var __importStar = (this && this.__importStar) || function (mod) {
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
-exports.cleanSkyBlockProfileMemberResponse = void 0;
+exports.cleanSkyBlockProfileMemberResponse = exports.cleanSkyBlockProfileMemberResponseBasic = void 0;
const cached = __importStar(require("../../hypixelCached"));
const fairysouls_1 = require("./fairysouls");
const inventory_1 = require("./inventory");
const minions_1 = require("./minions");
+const objectives_1 = require("./objectives");
const stats_1 = require("./stats");
+async function cleanSkyBlockProfileMemberResponseBasic(member, included = null) {
+ return {
+ uuid: member.uuid,
+ username: await cached.usernameFromUser(member.uuid),
+ last_save: member.last_save,
+ first_join: member.first_join,
+ };
+}
+exports.cleanSkyBlockProfileMemberResponseBasic = cleanSkyBlockProfileMemberResponseBasic;
/** Cleans up a member (from skyblock/profile) */
async function cleanSkyBlockProfileMemberResponse(member, included = null) {
// profiles.members[]
- const statsIncluded = included == null || included.includes('stats');
const inventoriesIncluded = included == null || included.includes('inventories');
return {
uuid: member.uuid,
username: await cached.usernameFromUser(member.uuid),
last_save: member.last_save,
first_join: member.first_join,
- // last_death: ??? idk how this is formatted,
- stats: statsIncluded ? stats_1.cleanProfileStats(member === null || member === void 0 ? void 0 : member.stats) : undefined,
- minions: statsIncluded ? minions_1.cleanMinions(member) : undefined,
- fairy_souls: statsIncluded ? fairysouls_1.cleanFairySouls(member) : undefined,
+ stats: stats_1.cleanProfileStats(member),
+ minions: minions_1.cleanMinions(member),
+ fairy_souls: fairysouls_1.cleanFairySouls(member),
inventories: inventoriesIncluded ? await inventory_1.cleanInventories(member) : undefined,
+ objectives: objectives_1.cleanObjectives(member),
};
}
exports.cleanSkyBlockProfileMemberResponse = cleanSkyBlockProfileMemberResponse;