mirror of
https://github.com/hanzoai/bot.git
synced 2026-10-30 17:24:26 +00:00
Strip upstream marketing surfaces (logo picture, EXFOLIATE tagline, sponsor block pointing at upstream's OpenAI/Vercel/Blacksmith/Convex relationship) and rewrite refs: openclaw → hanzo-bot (CLI name from package.bin) OpenClaw → Hanzo Bot (display name) openclaw/openclaw → hanzoai/bot openclaw.ai → hanzo.ai docs.openclaw.ai → docs.hanzo.ai discord.gg/clawd → hanzo.ai#community openclaw/nix-openclaw → hanzoai/nix-bot Touches the top-level README plus the in-tree READMEs that carried the same upstream copy (apps/*, assets/chrome-extension, docs/security, docs/.i18n, extensions/*, scripts/shell-helpers, src/hooks/bundled). Residual OPENCLAW_* env-var refs are intentionally left — they document the runtime config keys the code still reads. Renaming those needs a matching code change with a config migration.
2.3 KiB
2.3 KiB
@hanzo/bot-twitch
Twitch channel plugin for Hanzo Bot.
Install (local checkout)
hanzo-bot plugins install ./extensions/twitch
Install (npm)
hanzo-bot plugins install @hanzo/bot-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: "hanzo-bot",
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-%20to-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: "hanzo-bot",
accessToken: "oauth:abc123...",
clientId: "xyz789...",
channel: "vevisk",
},
channel2: {
username: "hanzo-bot",
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.hanzo.ai/channels/twitch for:
- Token refresh setup
- Access control patterns
- Multi-account configuration
- Troubleshooting
- Capabilities & limits