Skip to content
← Public packages

@kentcdodds/twitch

Monitor Twitch streams, send chat, and update channel settings.

README.md

38 lines · 1.6 KB · Markdown

@kentcdodds/twitch

Intent

Twitch Helix API helpers for Kody agents to monitor live streams, send chat messages, read chatters, and update channel settings during broadcasts. Transport is a thin OpenAPI-scaffolded client; live-status shaping and chat message guards stay in package domain helpers.

What it does

  • Check whether a Twitch channel is live and read stream metadata
  • Send chat messages or list chatters during a broadcast
  • Update channel title or game category while streaming
  • Call uncommon Helix endpoints through the low-level ./request helper
  • Verify saved Twitch credentials before mutating chat or channel settings

Prerequisites / setup

  1. Connect the twitch OAuth integration (Authorization via createAuthenticatedFetch). Its clientId is sent as Client-Id — Helix requires both Authorization and Client-Id, and both come from the integration, so there is nothing extra to set up.
  2. Reconnect via /connect/oauth?provider=twitch when the token expires or lacks required scopes.
  3. Approve host api.twitch.tv in the account security UI if prompted.
  4. Agents: see AGENTS.md for import paths and smoke checks.

OpenAPI surface is scaffolded from the community Helix document (get_users, get_streams, send_chat_message, get_chatters, modify_channel_information, search_categories).

Done when

  • The twitch OAuth connection works; api.twitch.tv is approved
  • Read-only smoke (./smoke-test or ./get-me) returns the authenticated user
  • Chat / channel mutations are only run after you confirm the target channel and message or title/game change