diff options
author | mat <github@matdoes.dev> | 2022-04-30 00:20:49 -0500 |
---|---|---|
committer | mat <github@matdoes.dev> | 2022-04-30 00:20:49 -0500 |
commit | 2240140136b9dfc0faeb1d29edf037609f9e8c9c (patch) | |
tree | 93419b5b0db5961ad1bf75840dffac3461a8f0fe /src/database.ts | |
parent | 41bfebfba8eb0c2f830e01f03f8765865e8108b0 (diff) | |
download | skyblock-api-2240140136b9dfc0faeb1d29edf037609f9e8c9c.tar.gz skyblock-api-2240140136b9dfc0faeb1d29edf037609f9e8c9c.tar.bz2 skyblock-api-2240140136b9dfc0faeb1d29edf037609f9e8c9c.zip |
revamp skills api
Diffstat (limited to 'src/database.ts')
-rw-r--r-- | src/database.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/database.ts b/src/database.ts index 8b606d4..04b3825 100644 --- a/src/database.ts +++ b/src/database.ts @@ -159,9 +159,10 @@ function getMemberCollectionAttributes(member: CleanMember): StringNumber { } function getMemberSkillAttributes(member: CleanMember): StringNumber { + if (!member.skills.apiEnabled) return {} const skillAttributes = {} - for (const collection of member.skills) { - const skillLeaderboardName = `skill_${collection.name}` + for (const collection of member.skills.list) { + const skillLeaderboardName = `skill_${collection.id}` skillAttributes[skillLeaderboardName] = collection.xp } return skillAttributes |