diff options
| author | salmonik <salmonik@tuta.io> | 2026-08-19 19:28:39 +0200 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-08-19 19:28:39 +0200 |
| commit | 11507d00fb774e59afe2c304a6922f875865caee (patch) | |
| tree | edb7350e9cb89bc37501bf1248770d9384c787b1 /CONTEXT.md | |
| parent | fix: clear voice_activity upon starting (diff) | |
| download | senator-sperma-11507d00fb774e59afe2c304a6922f875865caee.tar.gz senator-sperma-11507d00fb774e59afe2c304a6922f875865caee.zip | |
feat: leaderboads
Diffstat (limited to 'CONTEXT.md')
| -rw-r--r-- | CONTEXT.md | 14 |
1 files changed, 14 insertions, 0 deletions
| @@ -18,3 +18,17 @@ holds no implementation decisions or specs (those live in `docs/adr/`). | |||
| 18 | - **Flush** — the `/record` action: snapshot the current recording buffer to an | 18 | - **Flush** — the `/record` action: snapshot the current recording buffer to an |
| 19 | mp3 and upload it to Copyparty. Non-destructive — the buffer keeps recording | 19 | mp3 and upload it to Copyparty. Non-destructive — the buffer keeps recording |
| 20 | after a flush, so successive calls may overlap. | 20 | after a flush, so successive calls may overlap. |
| 21 | |||
| 22 | ## Stats & Leaderboard | ||
| 23 | |||
| 24 | - **User stats** — cumulative per-user counters (message count, total voice | ||
| 25 | active time, total voice AFK time) stored in the `user_stats` table. Persists | ||
| 26 | across restarts. Distinct from *voice activity* which is session-scoped. | ||
| 27 | - **Voice activity** (session) — per-session timing metadata (join time, current | ||
| 28 | active/AFK durations, is_afk flag). Resets when user joins VC. Used for | ||
| 29 | real-time status, not leaderboard rankings. | ||
| 30 | - **Leaderboard** — `/leaderboard` command group showing ranked user stats. | ||
| 31 | Metrics: `messages`, `active` (voice), `afk` (voice), `total` (voice active + | ||
| 32 | afk). Paged at 10 entries, descending by default. | ||
| 33 | - **Tracked guild** — the guild containing `status_channel_id`. Message counts | ||
| 34 | are only tracked in this guild. | ||
