TwitchBot
A local desktop Twitch bot - loyalty system, recurring timers, Helix-backed moderation, and event automations.
Problem
Most Twitch chatbots are either a SaaS dashboard with limited customisation or a Python script the streamer has to babysit. I wanted a real desktop application: install, sign in once, run locally, own your data, and get the breadth of features that cloud bots gate behind a tier.
TwitchBot screenshots

01 / 09Dashboard — live chat, events, and stream status
Screenshots use seeded demo data.
Approach
An Electron app with a React + TypeScript frontend and a SQLite store on disk. The streamer's PC is the entire infrastructure — no cloud, no telemetry, no third-party servers. Chat runs over tmi.js, Twitch events arrive over the EventSub WebSocket, and moderation goes through Helix.
Chat and EventSub publish typed events on an internal bus that the timer and automation engines subscribe to; moderation and EXP run as an explicit, ordered pipeline (moderation first). Everything shares one SQLite store:
- Commands. Custom responses with an 11-variable template system
(
{user},{level},{watch_time}, …), per-command cooldowns, and set-based permissions (mix of everyone / follower / VIP / subscriber / moderator). - Timers. Recurring chat messages that wait on both elapsed time and a minimum number of chat lines since last firing — so the bot stays quiet in an empty room.
- Moderation. Seven rule types (links, caps, emote spam, repeated messages, symbol spam, blocked words, first-message screening), each with its own thresholds and start tier on a four-tier escalation ladder (warn → 10s → 10m → 24h). Subscribers and VIPs can be exempted; permitted users overridden permanently. Every action is logged and filterable.
- Automations. A rules engine fires on follows, subs, gifts, cheers,
raids, and stream online/offline. Conditions are AND-joined and read event
payload fields (
viewer_count,bits,tier,is_gift). Actions chain: chat message, sound, Discord webhook, Helix timeout, EXP bonus, ordered delay. A test button dry-runs an automation against a mock payload. - Loyalty & analytics. Every chatter accrues EXP, levels up, and builds a watch streak. A live feed mirrors chat plus every follow / sub / cheer / raid in real time; the analytics page charts the long view.
Discord output is first-class: a dedicated page for webhook URLs and a visual embed-template editor with a live Discord-style preview.
Result
Honest status: released, unproven. v1.1.0 ships as a Windows installer built by CI from a tagged release. Behind it is a feature-deep, tested codebase — five subsystems, four-tier moderation escalation, an automation engine, 55 unit tests plus an Electron IPC integration suite run by CI on every pull request — proving a non-trivial multi-system desktop app can run local-first, with every byte of viewer data in a single SQLite file the streamer can read, back up, or delete. What doesn't exist yet is a real channel running it.
It stays listed as open-source rather than production: building it taught me more about event-bus architecture, OAuth token lifecycles, and desktop packaging than any hosted bot ever would have. It earns a promotion only if a real channel runs it — and it's labeled accordingly until then.







