mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-23 04:25:18 +00:00
Summary: - The PR adds an async test-only Twitch client-manager registry reset helper, a focused registry isolation test, and an Unreleased changelog entry. - Reproducibility: yes. Source inspection shows getOrCreateClientManager() returns the cached module-level manager for the same account id, and the repo’s Vitest configuration is explicitly non-isolated. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(twitch): export clearRegistryForTest for cross-test isolation (#8… Validation: - ClawSweeper review passed for head38c3fadc91. - Required merge gates passed before the squash merge. Prepared head SHA:38c3fadc91Review: https://github.com/openclaw/openclaw/pull/84309#issuecomment-4491930986 Co-authored-by: HCL <chenglunhu@gmail.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
@openclaw/twitch
Twitch channel plugin for OpenClaw.
Install (local checkout)
openclaw plugins install ./path/to/local/twitch-plugin
Install (npm)
openclaw plugins install @openclaw/twitch
Onboarding: select Twitch and confirm the install prompt to fetch the plugin automatically.
Config
Minimal config (simplified single-account):
⚠️ Important: requireMention defaults to true. Add access control (allowFrom or allowedRoles) to prevent unauthorized users from triggering the bot.
{
channels: {
twitch: {
enabled: true,
username: "openclaw",
accessToken: "oauth:abc123...", // OAuth Access Token (add oauth: prefix)
clientId: "xyz789...", // Client ID from Token Generator
channel: "vevisk", // Channel to join (required)
allowFrom: ["123456789"], // (recommended) Your Twitch user ID only (Convert your twitch username to ID at https://www.streamweasels.com/tools/convert-twitch-username-to-user-id/)
},
},
}
Access control options:
requireMention: false- Disable the default mention requirement to respond to all messagesallowFrom: ["your_user_id"]- Restrict to your Twitch user ID only (find your ID at https://www.twitchangles.com/xqc or similar)allowedRoles: ["moderator", "vip", "subscriber"]- Restrict to specific roles
Multi-account config (advanced):
{
channels: {
twitch: {
enabled: true,
accounts: {
default: {
username: "openclaw",
accessToken: "oauth:abc123...",
clientId: "xyz789...",
channel: "vevisk",
},
channel2: {
username: "openclaw",
accessToken: "oauth:def456...",
clientId: "uvw012...",
channel: "secondchannel",
},
},
},
},
}
Setup
- Create a dedicated Twitch account for the bot, then generate credentials: Twitch Token Generator
- Select Bot Token
- Verify scopes
chat:readandchat:writeare selected - Copy the Access Token to
tokenproperty - Copy the Client ID to
clientIdproperty
- Start the gateway
Full documentation
See https://docs.openclaw.ai/channels/twitch for:
- Token refresh setup
- Access control patterns
- Multi-account configuration
- Troubleshooting
- Capabilities & limits