Mirrors Twitch + YouTube Live chat to Discord with rich embeds, channel point redeem tracking, and Discord slash commands for moderation.
| Feature | Detail |
|---|---|
| Twitch chat | Purple embed → #chat-feed |
| YouTube chat | Red embed → #chat-feed |
| Twitch redeems | Gold embed → #redeem-feed and #chat-feed |
/ban <user> [reason] [platform] |
Bans on Twitch and/or YouTube |
/vip <user> [platform] |
Grants VIP (Twitch) / Moderator (YouTube) |
/unvip <user> [platform] |
Removes VIP/Mod |
| YouTube ingest | WebSub primary, masterchat polling fallback |
| Plugin Support | Look at src/plugins for how to make stuff |
Current inbuilt plugins:
- Minecraft Link -> hides a regex and moves it to #plugin-chat
- GD Level Requests -> exactly what it sounds like
npm installRequires Node.js 18+.
cp .env.example .envFill in .env — see the comments in .env.example for each value.
- Go to https://discord.com/developers/applications → New Application
- Bot tab → Reset Token → copy token into
DISCORD_BOT_TOKEN - Copy the Application ID into
DISCORD_CLIENT_ID - OAuth2 → URL Generator: scopes =
bot+applications.commands, permissions =Send Messages - Visit the generated URL to invite the bot to your server
- Right-click your Discord server → Copy Server ID →
DISCORD_GUILD_ID
For each channel (#chat-feed and #redeem-feed):
- Channel Settings → Integrations → Webhooks → New Webhook
- Copy URL into
DISCORD_CHAT_WEBHOOK_URL/DISCORD_REDEEM_WEBHOOK_URL
- Bot OAuth token: https://twitchapps.com/tmi/ (log in as the bot account)
- App credentials: https://dev.twitch.tv/console/apps → Register Your Application
- The bot account must be a moderator in the channel to execute
/banand/vip
- API key: https://console.cloud.google.com/ → APIs & Services → Credentials → Create Credentials → API Key
- Enable the YouTube Data API v3 in your project
Set WEBSUB_PUBLIC_URL to your server's public HTTPS URL (e.g. https://yourdomain.com). The bot will receive push notifications when your channel goes live instead of polling.
If you don't have a public URL, leave it blank — the bot will fall back to polling every YT_POLL_INTERVAL seconds.
npm startOr with auto-restart on file changes (Node 18+):
npm run devYouTube's moderation API (ban user, add moderator) requires OAuth 2.0 with the channel owner's credentials — an API key alone is not enough. The current implementation will return a clear error message when you try /ban or /vip on YouTube.
To enable YouTube mod actions, you would need to:
- Set up OAuth 2.0 in your Google Cloud project
- Add
https://www.googleapis.com/auth/youtube.force-sslscope - Implement the token refresh flow and store the refresh token
This is a planned improvement. Twitch mod actions work fully out of the box.
Twitch IRC (tmi.js)
└─ chat messages ──────────────────┐
└─ channel point redeems ──────────┤
│
YouTube (masterchat) ▼
└─ WebSub trigger ──► queue ──► Discord webhooks
└─ polling fallback ──┘ • chat-feed (purple/red/gold embeds)
• redeem-feed (gold embeds)
Discord bot (discord.js)
└─ /ban /vip /unvip ──► Twitch Helix API
└──► YouTube Data API (OAuth required)