feat: add realtime Discord leaderboards

This commit is contained in:
2026-07-25 00:06:52 +07:00 Unverified
parent 7a9e67e283
commit bb6740fcee
39 changed files with 1917 additions and 119 deletions
+29
View File
@@ -34,3 +34,32 @@ non-empty text, even when the overall question is optional.
A form that no longer accepts new submissions or updates. A person with an existing
submission may still read or delete it.
## XP leaderboard
A public ranking of stored level 1+ members by cumulative XP.
## VC leaderboard
A public ranking of cumulative voice time across the guild’s current voice and Stage
channels, or one selected current channel.
## Current channel
A Discord voice or Stage channel returned by the guild channel API at the time its
five-minute metadata cache is filled. Deleted and historical channels are not current.
## Shared rank
A competition ranking in which equal values receive the same position and the next
position skips the tied places, such as 1, 2, 2, 4.
## Leaderboard read model
The website’s uncached, read-only view of the bot-owned `user_levels` and `voice_time`
tables, combined with current Discord channel metadata.
## Leaderboard SSE event
A minimal Redis notification on `erika:sse:leaderboards` that tells an open XP or VC
page to refresh its Server Component data after a bot transaction commits.