Watch time: one 5-minute tick while live (lurkers included), per-stream check-ins

watchtime.js: stream.online/offline (+ Helix /streams check at start) give the live
state; every 5 min the chatter list (Helix /chat/chatters, new scope
moderator:read:chatters) gets +1 tick = 5 minutes = 5 points, overall and per day,
so watch time and points share one sync. First chat message per stream is stored as
a check-in. Without the scope the tick logs once and skips.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Bashy 2026-11-22 17:35:21 +02:00
parent f4ee205d4a
commit 1c36e80f66
6 changed files with 145 additions and 2 deletions

View file

@ -10,7 +10,7 @@ everyone's points recalculate. Name to be decided (e.g. "Streamer points").
| Action | Points | Notes |
|---|---|---|
| Chat message | 10 | max 1 per 5 min per viewer (counted at ingestion: chat_user.scored / chat_user_day.scored) |
| First message in a stream (check-in) | 25 | once per stream; needs stream.online/offline to know streams |
| First message in a stream (check-in) | 25 | once per stream (stream_checkin, built with watch time) |
| First message ever on the channel | 50 | Twitch's first-time chatter flag, kept in chat_user.intro |
| Follow | 50 | once |
| Watch streak | 5 x streak | max 100 |
@ -22,7 +22,7 @@ everyone's points recalculate. Name to be decided (e.g. "Streamer points").
| Tip | 100 per 1 EUR | |
| Incoming raid | 100 flat | no reward for raid size |
| Emotes, commands | 0 | stats only, no farming |
| Watch time | 10 per 10 min live | needs moderator:read:chatters (chatter list); import StreamElements' watch time once (SE key already in .env) so viewers keep their history when our bot takes over `!watchtime` |
| Watch time | 5 per 5 min live (one tick updates watch time and points together; built: src/watchtime.js) | needs moderator:read:chatters (chatter list); import StreamElements' watch time once (SE key already in .env) so viewers keep their history when our bot takes over `!watchtime` |
Levels (cassette theme): Newcomer, Regular 500, Tape Collector 2000, Mixtape Maker 6000, Side B Legend 15000.
Balance: lurker 60/h, active chatter up to 180/h; Tier 1 sub (500) ~ 8 h watching.