Skip to content

Commit

Permalink
fix: slayer command
Browse files Browse the repository at this point in the history
  • Loading branch information
Sychic committed Nov 25, 2023
1 parent 2f95a00 commit 6afba8c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ object SlayerCommand : StatCommand("skytilsslayer", needProfile = false) {
return
}

val slayersObject = profileResponse.profile.members[uuid.nonDashedString()]?.slayerBosses?.ifNull {
val slayersObject = profileResponse.profile.members[uuid.nonDashedString()]?.slayer?.slayerBosses?.ifNull {
printMessage("$failPrefix §cUnable to retrieve slayer information")
return@ifNull
}
Expand Down
7 changes: 6 additions & 1 deletion src/main/kotlin/gg/skytils/skytilsmod/utils/apiTools.kt
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,13 @@ data class SkyblockProfile(val members: Map<NonDashedUUID, ProfileMember>)

@Serializable
data class ProfileMember(
val slayer: SlayerData
)

@Serializable
class SlayerData(
@SerialName("slayer_bosses")
val slayerBosses: Map<MobName, SlayerBoss> = emptyMap(),
val slayerBosses: Map<MobName, SlayerBoss> = emptyMap()
)

@Serializable
Expand Down

0 comments on commit 6afba8c

Please sign in to comment.