aboutsummaryrefslogtreecommitdiff
path: root/src/cleaners/skyblock/member.ts
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2022-05-30 04:42:17 +0000
committerGitHub <noreply@github.com>2022-05-29 23:42:17 -0500
commit5777b24bbf1ccad2b4c897d8c3960b892405b7c0 (patch)
treea7f6e6ff7b0ece158378bc6c9b331fa8109d1d5d /src/cleaners/skyblock/member.ts
parent445d2929970e583cd1b7331d6a86015b0cf25777 (diff)
downloadskyblock-api-5777b24bbf1ccad2b4c897d8c3960b892405b7c0.tar.gz
skyblock-api-5777b24bbf1ccad2b4c897d8c3960b892405b7c0.tar.bz2
skyblock-api-5777b24bbf1ccad2b4c897d8c3960b892405b7c0.zip
Experimentation table (#220)
* Create experimentation.ts * Experimentation implementation * Fix tests
Diffstat (limited to 'src/cleaners/skyblock/member.ts')
-rw-r--r--src/cleaners/skyblock/member.ts9
1 files changed, 7 insertions, 2 deletions
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