Create AutoMod rule
create_automod_ruleCreate server-side Discord moderation rules to filter spam, keywords, mention floods, and member profiles, triggering message blocks, channel alerts, or timeouts.
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 | ||
| 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 | ||
| keywords | No | For keyword rules. Wildcards: word* matches prefixes. | |
| allow_list | No | Words exempt from keyword and keyword_preset rules. | |
| exempt_roles | No | ||
| 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 | ||
| timeout_minutes | No | How long timeout actions last. |