Pular para o conteúdo principal
ExemploAvançado1 min de leituraAtualizado em Jul 2, 2026
agentactortwitchmoderationspamcommands

Twitch Moderator Bot

Agente actor do Twitch baseado em regras que lida com comandos simples de chat e encaminha todas as outras mensagens para um workflow de moderação vinculado que detecta venda de espectadores, venda de inscritos e spam similar.

Baixar ZIP · 2.3 KB

Dependências Incluídas

informação

O ZIP para download inclui todas as dependências listadas abaixo. Todas as referências cruzadas são vinculadas automaticamente durante a importação.

Workflows: Workflow de Moderação do Twitch (Classificador de Anúncios)

Substitua workflowId pelo ID deste workflow vinculado ao inserir o actor.

JSON Completo

Clique para expandir
{
"description": "Rule-based Twitch actor agent 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",
"actor",
"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 actor."
}
],
"document": {
"name": "Twitch Moderator",
"assistantType": "actor",
"platformType": null,
"options": {
"log_level": "info"
},
"platform": {
"actor": {
"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\": contact.name,\n \"twitch_message\": contactMessage.body.text,\n}",
"onFailure": "throw"
}
}
}
}
]
}
}
}
}
TipoAgent · actor
Regras5
Canaltwitch
Versão1.0.0
Baixar ZIP
twitch-bot-assistant-moderator2.3 KB
Nesta página