aboutsummaryrefslogtreecommitdiff
path: root/src/cleaners/skyblock
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2021-03-01 13:40:03 -0600
committermat <27899617+mat-1@users.noreply.github.com>2021-03-01 13:40:03 -0600
commit7786408cc11fdf752fd03339a59a6d7d717d547d (patch)
treee37a56b54c2cb97c0dfe3914e618bec9ceef60d6 /src/cleaners/skyblock
parente4018a7008da265b9d642dcb5039ab7eeb2026d2 (diff)
downloadskyblock-api-7786408cc11fdf752fd03339a59a6d7d717d547d.tar.gz
skyblock-api-7786408cc11fdf752fd03339a59a6d7d717d547d.tar.bz2
skyblock-api-7786408cc11fdf752fd03339a59a6d7d717d547d.zip
add mythos stat category
Diffstat (limited to 'src/cleaners/skyblock')
-rw-r--r--src/cleaners/skyblock/member.ts1
-rw-r--r--src/cleaners/skyblock/profile.ts2
-rw-r--r--src/cleaners/skyblock/stats.ts3
3 files changed, 4 insertions, 2 deletions
diff --git a/src/cleaners/skyblock/member.ts b/src/cleaners/skyblock/member.ts
index a4ca053..424bb9b 100644
--- a/src/cleaners/skyblock/member.ts
+++ b/src/cleaners/skyblock/member.ts
@@ -52,6 +52,7 @@ export async function cleanSkyBlockProfileMemberResponse(member, included: Inclu
// profiles.members[]
const inventoriesIncluded = included == null || included.includes('inventories')
const player = await cached.fetchPlayer(member.uuid)
+ if (!player) return
return {
uuid: member.uuid,
username: player.username,
diff --git a/src/cleaners/skyblock/profile.ts b/src/cleaners/skyblock/profile.ts
index 6e98f8f..086cd31 100644
--- a/src/cleaners/skyblock/profile.ts
+++ b/src/cleaners/skyblock/profile.ts
@@ -58,7 +58,7 @@ export async function cleanSkyblockProfileResponse(data: any, options?: ApiOptio
))
}
- const cleanedMembers: CleanMember[] = await Promise.all(promises)
+ const cleanedMembers: CleanMember[] = (await Promise.all(promises)).filter(m => m !== null && m !== undefined)
const memberMinions: CleanMinion[][] = []
diff --git a/src/cleaners/skyblock/stats.ts b/src/cleaners/skyblock/stats.ts
index db8f8c9..6c274bc 100644
--- a/src/cleaners/skyblock/stats.ts
+++ b/src/cleaners/skyblock/stats.ts
@@ -1,10 +1,11 @@
const statCategories: { [ key: string ]: string[] | null } = { // sorted in order of importance
'deaths': ['deaths_', 'deaths'],
'kills': ['kills_', 'kills'],
- 'fishing': ['items_fished_', 'items_fished'],
+ 'fishing': ['items_fished_', 'items_fished', 'shredder_'],
'auctions': ['auctions_'],
'collection': ['collection_'],
'races': ['_best_time', '_best_time_2'],
+ 'mythos': ['mythos_burrows_', 'mythos_kills'],
'misc': null // everything else goes here
}