aboutsummaryrefslogtreecommitdiff
path: root/src/cleaners/skyblock/minions.ts
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2021-02-13 16:23:28 -0600
committermat <27899617+mat-1@users.noreply.github.com>2021-02-13 16:23:28 -0600
commitdd513537e240bbaf12c4f204d49db88111633d98 (patch)
treee51cb050b2ff8748066420a78f15106770b237a4 /src/cleaners/skyblock/minions.ts
parent43f194ff780d704834706ac6da454a8858098906 (diff)
downloadskyblock-api-dd513537e240bbaf12c4f204d49db88111633d98.tar.gz
skyblock-api-dd513537e240bbaf12c4f204d49db88111633d98.tar.bz2
skyblock-api-dd513537e240bbaf12c4f204d49db88111633d98.zip
add fairy souls
Diffstat (limited to 'src/cleaners/skyblock/minions.ts')
-rw-r--r--src/cleaners/skyblock/minions.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cleaners/skyblock/minions.ts b/src/cleaners/skyblock/minions.ts
index b5ac85d..06e7752 100644
--- a/src/cleaners/skyblock/minions.ts
+++ b/src/cleaners/skyblock/minions.ts
@@ -10,9 +10,9 @@ export interface CleanMinion {
* Clean the minions provided by Hypixel
* @param minionsRaw The minion data provided by the Hypixel API
*/
-export function cleanMinions(minionsRaw: string[]): CleanMinion[] {
+export function cleanMinions(data: any): CleanMinion[] {
const minions: CleanMinion[] = []
- for (const minionRaw of minionsRaw ?? []) {
+ for (const minionRaw of data?.crafted_generators ?? []) {
// do some regex magic to get the minion name and level
// examples of potential minion names: CLAY_11, PIG_1, MAGMA_CUBE_4
const minionName = minionRaw.split(/_\d/)[0].toLowerCase()