Skip to main content

Twitch Moderator Bot

Rule-based Twitch bot that handles simple chat commands and forwards all other messages to a linked moderation workflow that detects viewer-selling, subscriber-selling, and similar spam.

agent bot twitch moderation spam commands

Download ZIP

What's Included

FieldValue
NameTwitch Moderator Bot
TypeAgent
Assistant Typebot
Rules5

Included Dependencies

info

The downloadable ZIP includes all dependencies listed below. All cross-references are automatically linked during import.

Workflows: Classify Twitch Advertising Message

Replace workflowId with the ID of this linked workflow when seeding the bot.

Full JSON

Click to expand
{
"description": "Rule-based Twitch bot that handles simple chat commands and forwards all other messages to a linked moderation workflow that detects viewer-selling, subscriber-selling, and similar spam.",
"tags": [
"agent",
"bot",
"twitch",
"moderation",
"spam",
"commands"
],
"linkedExamples": [
{
"type": "workflows",
"variant": "twitch-bot-assistant-moderator",
"relationship": "Replace `workflowId` with the ID of this linked workflow when seeding the bot."
}
],
"document": {
"name": "Twitch Moderator Bot",
"assistantType": "bot",
"platformType": null,
"options": {
"log_level": "info"
},
"platform": {
"bot": {
"stopOnFirstMatch": true,
"fallbackMessage": {
"expr": "\"\"",
"onFailure": "throw"
},
"rules": [
{
"condition": {
"expr": "contactMessage.body.text.startsWith('!hello')",
"onFailure": "throw"
},
"action": {
"actionType": "actions/messaging/conversation/response/compose",
"actions/messaging/conversation/response/compose": {
"messages": [
{
"type": "text",
"payload": {
"text": {
"expr": "\"Hello! Welcome to the stream!\"",
"onFailure": "throw",
"useSimpleCel": true
}
}
}
]
}
}
},
{
"condition": {
"expr": "contactMessage.body.text.startsWith('!help')",
"onFailure": "throw"
},
"action": {
"actionType": "actions/messaging/conversation/response/compose",
"actions/messaging/conversation/response/compose": {
"messages": [
{
"type": "text",
"payload": {
"text": {
"expr": "\"Available commands: !hello, !help, !socials\"",
"onFailure": "throw",
"useSimpleCel": true
}
}
}
]
}
}
},
{
"condition": {
"expr": "contactMessage.body.text.startsWith('!socials')",
"onFailure": "throw"
},
"action": {
"actionType": "actions/messaging/conversation/response/compose",
"actions/messaging/conversation/response/compose": {
"messages": [
{
"type": "text",
"payload": {
"text": {
"expr": "\"Follow us on Twitter @example and Instagram @example_ig\"",
"onFailure": "throw",
"useSimpleCel": true
}
}
}
]
}
}
},
{
"condition": {
"expr": "contactMessage.body.text.startsWith('!')",
"onFailure": "throw"
},
"action": {
"actionType": "actions/messaging/conversation/response/compose",
"actions/messaging/conversation/response/compose": {
"messages": [
{
"type": "text",
"payload": {
"text": {
"expr": "\"Unknown command. Try !hello, !help, or !socials\"",
"onFailure": "throw"
}
}
}
]
}
}
},
{
"condition": {
"expr": "true",
"onFailure": "throw"
},
"action": {
"actionType": "actions/data/company/automation/execute_workflow_manual",
"actions/data/company/automation/execute_workflow_manual": {
"workflowId": "<linked-workflow-id>",
"args": {
"expr": "{\n \"twitch_username\": client.name,\n \"twitch_message\": contactMessage.body.message,\n}",
"onFailure": "throw"
}
}
}
}
],
"onNewSessionActions": []
}
}
}
}

How to Import

  1. Download the ZIP file using the button above
  2. Navigate to Company Settings → Data Transfer in your AutoTalk dashboard
  3. Click Import and select the downloaded ZIP file
  4. Review the import summary and confirm
  5. All document IDs are automatically remapped — no manual ID editing needed
tip

This bundle includes both the agent and its dependencies. All cross-references (workflow IDs in tool actions) are automatically linked during import.