automod_modify_rule
automod_modify_rule
Section titled “automod_modify_rule”Category: automod
Update an AutoMod rule’s settings. Pass only fields you want to change.
When to use
Section titled “When to use”- Tweak keyword list, change actions, toggle enabled.
When NOT to use
Section titled “When NOT to use”| Field | Type | Required | Description |
|---|---|---|---|
guild_id | string | yes | Guild containing the rule |
rule_id | string | yes | Rule to modify |
name | string | no | |
event_type | integer | no | AutoMod event type (1 MESSAGE_SEND, 2 MEMBER_UPDATE) |
trigger_metadata | object | no | AutoMod trigger metadata (fields valid per trigger_type) |
actions | array | no | |
enabled | boolean | no | |
exempt_roles | array | no | |
exempt_channels | array | no | |
audit_reason | string | no | Reason recorded in audit log (X-Audit-Log-Reason header) |
Returns
Section titled “Returns”\{id, name, trigger_type, enabled\}.
Output schema
Section titled “Output schema”| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | Discord AutoMod rule ID |
name | string | yes | |
trigger_type | integer | yes | |
enabled | boolean | yes |
Annotations
Section titled “Annotations”| Property | Value |
|---|---|
| Read-only | no |
| Destructive | no |
| Idempotent | yes |
| Open-world | yes |
| Confirmation required | no |