docs: document Twitch notification plugin

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
user
2026-02-15 14:50:34 +01:00
parent 50fb8015cd
commit abcac95846
2 changed files with 44 additions and 0 deletions

View File

@@ -316,6 +316,19 @@ Accepts any YouTube URL: video, channel, handle, shorts, embed.
Names: lowercase alphanumeric + hyphens, 1-20 chars. Max 20 channels/channel.
Polls every 10min. Announces max 5 new videos per cycle. Persists across restarts.
## Twitch
```
!twitch follow <user> [name] # Follow streamer (admin)
!twitch unfollow <name> # Unfollow streamer (admin)
!twitch list # List followed streamers
!twitch check <name> # Force-poll now
```
Names: lowercase alphanumeric + hyphens, 1-20 chars. Max 20 streamers/channel.
Polls every 2min. Announces offline->live transitions. Persists across restarts.
No API credentials needed (uses public GQL endpoint).
## Plugin Template
```python

View File

@@ -598,3 +598,34 @@ Polling and announcements:
- Supports HTTP conditional requests (`ETag`, `If-Modified-Since`)
- 5 consecutive errors doubles the poll interval (max 1 hour)
- Subscriptions persist across bot restarts via `bot.state`
### `!twitch` -- Twitch Livestream Notifications
Follow Twitch streamers and get notified when they go live. Uses Twitch's
public GQL endpoint (no API credentials required).
```
!twitch follow <username> [name] Follow a streamer (admin)
!twitch unfollow <name> Unfollow a streamer (admin)
!twitch list List followed streamers
!twitch check <name> Check status now
```
- `follow` and `unfollow` require admin privileges
- All subcommands must be used in a channel (not PM)
- If `name` is omitted on `follow`, it defaults to the Twitch login (lowercase)
- Names must be lowercase alphanumeric + hyphens, 1-20 characters
- Twitch usernames must match `[a-zA-Z0-9_]{1,25}`
- Maximum 20 streamers per IRC channel
Polling and announcements:
- Streamers are polled every 2 minutes by default
- On `follow`, the current stream state is recorded without announcing
- Announcements fire on state transitions: offline to live, or new stream ID
- Format: `[name] is live: Stream Title (Game) -- https://twitch.tv/login`
- Game is omitted if not set; titles are truncated to 80 characters
- 5 consecutive errors doubles the poll interval (max 1 hour)
- Subscriptions persist across bot restarts via `bot.state`
- `list` shows live/error status indicators next to each streamer
- `check` forces an immediate poll and reports current status