Skip to main content

Twitch Bot

Status: Planned — not yet implemented

The Twitch bot is currently a scaffold only. platform/twitch_bot/src/main.rs is a placeholder (Hello, world!), the crate has no dependencies wired up yet, and the locale files are empty. There are no commands, no chat client, and no data sync at this time.

This page documents what actually exists today (config scaffolding) and the planned direction. It will be expanded as the bot is implemented.

What exists today

  • Crate: platform/twitch_bot/ (binary package twitch_bot) — placeholder main.rs, empty [dependencies].
  • Config scaffolding: platform/twitch_bot/config/default.toml + local.toml.
  • Locale scaffolding: platform/twitch_bot/locales/{en,de}.yml (currently empty).
  • Build: BUILD.bazel target present.

Twitch OAuth integration is separate and already implemented

The connection/OAuth layer for Twitch (channel + bot account linking, scopes, token refresh) already lives in the API via heimdall-integrations and is documented under Platform Integrations → Twitch. That is independent of this bot runtime — linking a Twitch account works today; the standalone bot process does not yet exist.

Configuration scaffolding

The committed config/default.toml defines these sections (values shown are the defaults):

SectionKeyDefaultNotes
(root)environmentdevelopment
[bot]prefix!Text command prefix
[bot]default_localeenFallback locale (en, de)
[api]graphql_endpointhttp://localhost:3000/v1/gqlHeimdall GraphQL
[api]rest_endpointhttp://localhost:3000/v1Heimdall REST
[api]websocket_endpointws://localhost:3000/v1/wsHeimdall WebSocket
[api]key""System API key — set via TWITCH_BOT_API_KEY
[api]bind_address127.0.0.1Health endpoint bind
[api]bind_port3006Health endpoint port
[apps]id_url / policies_url / console_url / docs_url / main_urllocalhost:3002–3005App link targets
[sentry]dsn""Set via TWITCH_BOT_SENTRY_DSN
[sentry]traces_sample_rate1.0
[logging]leveldebugtrace/debug/info/warn/error

Environment-variable overrides use the TWITCH_BOT_ prefix (e.g. TWITCH_BOT_API_KEY, TWITCH_BOT_SENTRY_DSN).

Planned direction

When implemented, the Twitch bot is expected to follow the same architecture as the Discord Bot: a standalone Rust service that talks to the Heimdall API over GraphQL/REST/WebSocket (protobuf), with i18n locales, RBAC permission checks, and data sync. This page will be expanded with commands, configuration, permissions, and data-sync details once that code lands.