Skip to content
Changelog

automation.set

Saves an automation, replacing the one with its id, or adds one from a recipe.

JSON-RPC 2.0project.write

An automation has name, enabled, a trigger, conditions, steps, and optionally queue, cooldown and user_cooldown (seconds). Without an id, it's a new one.

- Triggers (on): event (kinds: follow, sub, paid, cheer, raid; min_amount), command (name such as !so, who), chat (contains, first_time), timer (minutes, min_messages), manual. - Steps (do): chat, call (a Lightair method and its params), speak, sound, wait, var, points, if, random, run, http, stop.

Text is a template: {{ name }}, {{ message }}, {{ amount }}, {{ args.0 }}, {{ vars.x }} and more.

Parameters

  • automationobjectThe whole automation.
  • recipestringA recipe's key, instead of automation.

Result

  • (the automation)objectAs saved, with its id.

Errors

Invalid params (-32602) without either, or for something that isn't an automation. Not found (-32004) for an unknown recipe.

From an AI agent

The MCP server's set_automation reaches this method.

Example

ws://localhost:4455/rpc
{
"jsonrpc": "2.0",
"id": 1,
"method": "automation.set",
"params": {}
}

automation.list · automation.run · automation.remove