Repository navigation
darkbot v0.3.0
What's new
Keep the activity feed, and find what happened while darkbot was off
The activity feed lived only in the window, so a restart or an update
emptied it, and nothing that happened while darkbot was closed ever
showed up.
- The feed (redemptions, song requests, channel events) is saved to
activity.json and loaded on start: the last 200 lines, newest first,
older days shown with their date. Tests are shown but not kept. A
"Clear" button (two-step) empties it. - Unfollow detection saves the follower list (followers.json, tied to
the Twitch account). The first check after a start reports unfollows
and follows from while darkbot was off, since EventSub has no
catch-up. They are marked "while off", sorted in at their follow
time, and play no sound, post nothing and don't count for the
session. - An account missing from the paged follower list is checked once more
on its own before it counts as an unfollow, so someone unfollowing
mid-read can't make a page shift look like another unfollow.
Review before v0.3.0: security, correctness and performance fixes
A full review (security, concurrency/correctness, performance) before
the first stable release, plus govulncheck and staticcheck.
Dependencies
- Go 1.27.4, Wails 2.17.1, x/net 0.63, x/crypto 0.59, x/sys 0.50,
x/text 0.44: govulncheck reported 23 reachable vulnerabilities
(stdlib crypto/x509 and net/http, x/net, Wails origin check), now
none. CI runs govulncheck from now on.
Chat safety
- One budget for everything darkbot posts (60 per 30 s; Twitch mutes
at 100) and one for event thank-yous (15 per 30 s): a follow-bot wave
can no longer make the streamer's account spam chat. - Song requests: at most 10 per minute for the whole channel.
- All of darkbot's own messages are recognised when they come back
through chat, so event thanks don't count as chat lines for timers.
Bugs
- Chat command sounds got a 404 in device output mode.
- Nothing stopped on exit (Wails v2 never cancels its context): darkbot
now has its own run context; on exit queued redemptions are refunded
and pending files saved, also when restarting for an update. - One revoked EventSub type stopped all of EventSub; channels without
channel points retried forever instead of keeping chat and events. - Start/stop of EventSub and unfollow detection could race into two
listeners; a stopped session could still report itself connected. - A redemption refused for a full queue still started its cooldown.
- Any request OBS rejected dropped the connection; an alert could stay
visible after OBS reconnected; slow attempts against something that
isn't OBS leaked a socket every 5 s (now backing off to 1 min). - Follows that arrived live were repeated as "while off" after a
restart. - A corrupt config.json stopped darkbot from starting; atomic writes
did not fsync. Now the file is set aside and defaults are used. - A local clock behind Twitch's could wipe the first minutes of a
session; clearing the feed could be undone by a save in flight.
Secrets
- The OBS password moves from config.json to the OS keyring.
- A newer fallback token file wins over an older keyring entry
(single-use refresh tokens made the older one dead). - Logout revokes the Twitch token at Twitch.
Performance
- Cooldown ring: at most 10 updates/s instead of every frame.
- State events: no more re-render every minute/5 min/30 min when
nothing changed; bursts render at most twice. - Follower list written only when it changed; EventSub dedupe pruned
every 30 s; sound files over 25 MB are refused.
Song titles in chat can be switched off
Spotify titles can be any text, and darkbot posts its answers as the
streamer's own account, which AutoMod doesn't filter: a viewer could
request a track whose title says something offensive. A new setting,
"Name song titles in chat" (on by default, like common chat bots),
lets the streamer answer requests and skips without titles; !song,
!next and !queue then say that titles aren't posted. The activity feed
still shows titles to the streamer.
Download
- Windows 10/11:
darkbot-windows-amd64.exe - macOS, Apple Silicon:
darkbot-macos-arm64.app.zip - macOS, Intel:
darkbot-macos-amd64.app.zip - Linux:
darkbot-linux-amd64
Already installed? darkbot updates itself on the next start.
Full changelog: v0.2.9...v0.3.0