Update Script
update_scriptUpdate an existing script. Each of name, type, commands, and variables is optional: a field left out keeps its stored value, an empty list clears that list, and a non-empty list replaces the whole list, never merging into it. A script's type cannot be changed: type, if sent, must match the script's bot type, so to switch types create a new script of the desired type instead. Sending commands or variables saves a new revision; a name alone renames the script. Read the script with get_script before changing it, never rebuild it from list_scripts. Every write against a user's existing data needs their explicit confirmation first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| script | Yes | The fields to change: name, type, commands, and variables. Leave a field out to keep it. type, if sent, must be the script's current type; a different type is rejected. | |
| scriptId | Yes | ||
| projectId | Yes |