aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-03-27 18:03:27 -0500
committermat <github@matdoes.dev>2022-03-27 18:03:27 -0500
commite68a3eb9a1d8003098fb6dfdbcc62c674b5bbe12 (patch)
treece4e123a8ca7d5313f06fdba3ff4ca1caa4a4ca6
parent8ed789ba8d12641d9d7c2639b5ea8f5d5d14e36b (diff)
downloadskyblock-api-e68a3eb9a1d8003098fb6dfdbcc62c674b5bbe12.tar.gz
skyblock-api-e68a3eb9a1d8003098fb6dfdbcc62c674b5bbe12.tar.bz2
skyblock-api-e68a3eb9a1d8003098fb6dfdbcc62c674b5bbe12.zip
Show harp leaderboards in list
-rw-r--r--src/database.ts15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/database.ts b/src/database.ts
index 51ab5d7..1702a20 100644
--- a/src/database.ts
+++ b/src/database.ts
@@ -258,6 +258,18 @@ export async function fetchSlayerLeaderboards(): Promise<string[]> {
return leaderboardNames
}
+export async function fetchHarpLeaderboards(): Promise<string[]> {
+ const harpSongs = await constants.fetchHarpSongs()
+ const leaderboardNames: string[] = []
+
+ for (const songId of harpSongs) {
+ leaderboardNames.push(`harp_${songId}_completions`)
+ leaderboardNames.push(`harp_${songId}_perfect_completions`)
+ }
+
+ return leaderboardNames
+}
+
/** Fetch the names of all the leaderboards that rank members */
export async function fetchAllMemberLeaderboardAttributes(): Promise<string[]> {
return [
@@ -273,6 +285,9 @@ export async function fetchAllMemberLeaderboardAttributes(): Promise<string[]> {
// slayer leaderboards
...await fetchSlayerLeaderboards(),
+ // harp leaderboards
+ ...await fetchHarpLeaderboards(),
+
'fairy_souls',
'first_join',
'purse',