Create AutoMod rule
create_automod_ruleCreate server-side Discord moderation rules that block or flag preset words, custom keywords, spam, mention floods, or profile violations, and optionally alert a channel or time out senders.
Instructions
Create a server-side moderation rule that runs on Discord's own infrastructure: Discord-maintained preset word lists (slurs, profanity, sexual content), custom keyword filters (with optional regex), spam detection, mention-flood limits, or member_profile checks on usernames, nicknames, and bios (Community servers only). For slur or hate-speech filtering prefer trigger keyword_preset with the slurs preset: Discord maintains the word list, so none needs to be written. Actions: block the message, alert a channel, and/or time the sender out (timeout is not available on spam, keyword_preset, or member_profile rules). On member_profile rules block quarantines the member until they fix their profile.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>",
"trigger": "<trigger>",
"actions": "<actions>"
},
"name": "create_automod_rule"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The rule's name, shown in the server's AutoMod settings. | |
| guild | No | Guild (server) name or ID. Omit to use the default guild. | |
| actions | Yes | What happens on a match. | |
| enabled | No | Default true. | |
| presets | No | For keyword_preset rules: Discord-maintained lists. | |
| trigger | Yes | What the rule catches: keyword (your own words and patterns), keyword_preset (Discord's word lists), spam (suspected spam), mention_spam (too many mentions in one message), or member_profile (words in member names). | |
| keywords | No | For keyword rules. Wildcards: word* matches prefixes. | |
| allow_list | No | Words exempt from keyword and keyword_preset rules. | |
| exempt_roles | No | Roles the rule does not apply to, by name or ID. | |
| alert_channel | No | Where alert actions post. | |
| mention_limit | No | For mention_spam rules: max unique mentions per message. | |
| regex_patterns | No | For keyword rules; Rust-flavored regex. | |
| exempt_channels | No | Channels the rule does not apply to, by name or ID. | |
| timeout_minutes | No | How long timeout actions last. |