Skip to content

Twitch/Discord chat bridge integration #6

@SotoAlt

Description

@SotoAlt

Overview

Bridge external chat platforms (Twitch, Discord, Telegram) into the game so live stream audiences can interact with the AI game master and players.

Scope

  • Chat bridge service that relays messages from external platforms to `POST /api/chat/bridge`
  • Twitch integration via `tmi.js`
  • Discord integration via `discord.js`
  • Telegram integration via `node-telegram-bot-api`
  • SSE stream at `/api/stream/events` relays game events back to platforms
  • Rate limiting to prevent spam (configurable cooldowns)
  • Audience messages displayed in-game with platform badge (Twitch/Discord/Telegram icon)

Reference

A reference implementation exists in `chat-bridge.js` — it handles all three platforms with configurable environment variables. The `/api/chat/bridge` endpoint accepts `{ sender, message, platform, senderType }`.

Notes

Each platform integration is optional — the bridge works with any combination of platforms enabled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions