create_automod_rule
Create Discord AutoModeration rules to block bad words, spam, or mention raids. Define triggers, keywords, alert channels, and timeout actions.
Instructions
Create a new AutoModeration rule (e.g. block bad words, spam, or mention raids)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Rule name | |
| reason | No | Audit log reason | |
| guildId | No | Discord server ID (defaults to DISCORD_GUILD_ID) | |
| keywordsCsv | No | Comma-separated list of keywords to match (for KEYWORD trigger) | |
| triggerType | No | Rule trigger type | KEYWORD |
| blockMessage | No | Whether to block the triggering message | |
| mentionLimit | No | Max allowed unique mentions (for MENTION_SPAM trigger) | |
| alertChannelId | No | Channel ID to send an alert log message to | |
| timeoutSeconds | No | Timeout user for N seconds (up to 28 days) | |
| regexPatternsCsv | No | Comma-separated list of regex patterns |