UVI
Connectors

Twitch

Watch and chat in a Twitch stream

The companion can watch a Twitch stream's chat and react: read recent messages and send replies. Reading any chat works even when the stream is offline.

Setup

  1. Get a Twitch user access token with the chat:read + chat:edit scopes (for example, at twitchtokengenerator.com).
  2. Fill the Environment variables:
    • TWITCH_USERNAME — the account that sits in chat (login, lowercase). A separate bot account works best: mentioning @thatname then addresses the companion.
    • TWITCH_OAUTH_TOKEN — the token from step 1.
    • TWITCH_CHANNEL — the channel to join on start (login without #).
  3. Press Connect, then fill in the Owner ID below the token: for Twitch it's your channel login in lowercase (the name in twitch.tv/<login>).

Twitch limits messages to 500 characters, and longer replies are cut.

Tools

ToolWhat it does
sendMessageSend a message to a channel's chat
joinChannelJoin another channel's chat
getRecentMessagesRead the latest chat messages
filterMessagesFilter chat by author, text or time
getStatusConnection status

For streams, Settings → Tools lets you keep only take_screenshot on: the companion comments on what's happening on screen, and the other built-in tools stay off.

Access settings

These fields below the token control who the companion listens to on this messenger. Press Save access settings to apply them.

  • Owner ID — for Twitch this is your channel login in lowercase, not a numeric ID. In direct chats, the companion replies only to it; while it is empty, it replies to no one.
  • Speak replies out loud — replies to this messenger are also spoken out loud on the desktop. Off means text-only replies.
  • Trusted chats — group chats the companion also responds in (Mentions — only when addressed, or All messages). Everyone there talks to the same companion and shares its conversation context: replies may reveal details from your other chats, so add only chats you trust.

On Twitch, trusted chats are other channels, and the bot has to join them first: through TWITCH_CHANNEL or the joinChannel tool. After an app restart it re-joins only the TWITCH_CHANNEL channel.

Incoming messages join your current session with the companion, which answers them in order. This works even when the app window is hidden. Your STT provider transcribes voice messages; your LLM understands photos if it supports vision. Video is not supported.

On this page