macro-create
Create a macro without running it (macro-execute runs it). type chat holds a chat command such as "/roll 1d20"; type script holds JavaScript that runs with GM rights and is accepted only while the module setting Allow Script Macros is on (off by default; the user turns it on in Foundry).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| img | No | Icon path | |
| name | Yes | Macro name | |
| type | Yes | chat or script | |
| scope | No | What a script macro may address; default global. | |
| folder | No | Folder ID (from folder-list, type Macro); omit for root. | |
| command | Yes | Chat command or JavaScript source |