From e68a3eb9a1d8003098fb6dfdbcc62c674b5bbe12 Mon Sep 17 00:00:00 2001 From: mat Date: Sun, 27 Mar 2022 18:03:27 -0500 Subject: Show harp leaderboards in list --- src/database.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src') 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 { return leaderboardNames } +export async function fetchHarpLeaderboards(): Promise { + 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 { return [ @@ -273,6 +285,9 @@ export async function fetchAllMemberLeaderboardAttributes(): Promise { // slayer leaderboards ...await fetchSlayerLeaderboards(), + // harp leaderboards + ...await fetchHarpLeaderboards(), + 'fairy_souls', 'first_join', 'purse', -- cgit