From 5777b24bbf1ccad2b4c897d8c3960b892405b7c0 Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Mon, 30 May 2022 04:42:17 +0000 Subject: Experimentation table (#220) * Create experimentation.ts * Experimentation implementation * Fix tests --- src/cleaners/skyblock/member.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/cleaners/skyblock/member.ts') diff --git a/src/cleaners/skyblock/member.ts b/src/cleaners/skyblock/member.ts index d69295e..9d68796 100644 --- a/src/cleaners/skyblock/member.ts +++ b/src/cleaners/skyblock/member.ts @@ -1,3 +1,5 @@ +import { AccessoryBagUpgrades, cleanAccessoryBagUpgrades } from './accessoryBagUpgrades.js' +import { cleanExperimentation, Experimentation } from './experimentation.js' import { cleanFarmingContests, FarmingContests } from './farmingContents.js' import { cleanCoopInvitation, CoopInvitation } from './coopInvitation.js' import { cleanCollections, Collection } from './collections.js' @@ -9,6 +11,7 @@ import { cleanProfileStats, StatItem } from './stats.js' import { CleanMinion, cleanMinions } from './minions.js' import { cleanSlayers, SlayerData } from './slayers.js' import { AccountCustomization } from '../../database.js' +import { cleanEssence, Essence } from './essence.js' import { cleanVisitedZones, Zone } from './zones.js' import { cleanSkills, Skills } from './skills.js' import * as cached from '../../hypixelCached.js' @@ -19,8 +22,6 @@ import * as constants from '../../constants.js' import { Included } from '../../hypixel.js' import { CleanPlayer } from '../player.js' import { CleanRank } from '../rank.js' -import { AccessoryBagUpgrades, cleanAccessoryBagUpgrades } from './accessoryBagUpgrades.js' -import { cleanEssence, Essence } from './essence.js' export interface CleanBasicMember { uuid: string @@ -48,6 +49,8 @@ interface ExtraCleanMemberFields { coopInvitation: CoopInvitation | null farmingContests: FarmingContests accessoryBagUpgrades: AccessoryBagUpgrades + experimentation: Experimentation + /** Whether the user left the coop */ essence: Essence /** Whether the member left the coop. */ left: boolean @@ -87,6 +90,7 @@ export async function cleanSkyBlockProfileMemberResponse(member: typedHypixelApi const harpPromise = cleanHarp(member) const inventoriesPromise = inventoriesIncluded ? cleanInventories(member) : Promise.resolve(undefined) const farmingContestsPromise = cleanFarmingContests(member) + const experimentationTablePromise = cleanExperimentation(member) return { uuid: member.uuid, @@ -118,6 +122,7 @@ export async function cleanSkyBlockProfileMemberResponse(member: typedHypixelApi coopInvitation: await coopInvitationPromise, farmingContests: await farmingContestsPromise, accessoryBagUpgrades: cleanAccessoryBagUpgrades(member), + experimentation: await experimentationTablePromise, essence: cleanEssence(member), left: (player.profiles?.find(profile => profile.uuid === profileId) === undefined) ?? false -- cgit