Modify AutoMod Rule

BlockAuto Moderation

Modify an existing auto moderation rule.

Inputs

Server IDRequired

Server the rule belongs to.

Rule IDRequired

ID of the rule to modify.

Name

New name for the rule.

Event Type

New event context for the rule.

OptionsMessage SendMember Update
Trigger Type

New trigger type.

OptionsKeywordSpamKeyword PresetMention SpamMember Profile
Keyword Filter

Comma-separated keywords to match against.

Regex Patterns

Comma-separated regex patterns to match against.

Presets

Pre-defined wordsets to use.

OptionsProfanitySexual ContentSlurs
Allow List

Comma-separated words that should not trigger the rule.

Mention Total Limit

Max unique role and user mentions allowed per message.

Enabled

Whether the rule is enabled.

Optionstruefalse
Exempt Roles

Comma-separated role IDs exempt from the rule.

Exempt Channels

Comma-separated channel IDs exempt from the rule.

Action Type

Action to take when the rule is triggered.

OptionsBlock MessageSend Alert MessageTimeout
Action Channel ID

Channel for alert messages (used with Send Alert Message).

Action Duration (Seconds)

Timeout duration in seconds (used with Timeout).

Action Custom Message

Custom message shown when a message is blocked (used with Block Message).

Outputs

Rule ID

ID of the modified rule.

Server ID

ID of the server.

Name

Name of the rule.

Creator ID

User who created the rule.

Enabled

Whether the rule is enabled.

Event Type

Event type.

Trigger Type

Trigger type.

Build a bot using blocks like Modify AutoMod Rule

Use this block in our visual flow editor. Bots are hosted 24/7 for free on inventor.bot.

Advanced Documentation

This documentation can be useful when using code mode. View as Markdown

ID: modify_automod_rule

Inputs

FieldInventScript nameValue
Server IDserver_id
Rule IDrule_id
Namename
Event Typeevent_type"Message Send", "Member Update"
Trigger Typetrigger_type"Keyword", "Spam", "Keyword Preset", "Mention Spam", "Member Profile"
Keyword Filterkeyword_filter
Regex Patternsregex_patterns
Presetspresets"Profanity", "Sexual Content", "Slurs"
Allow Listallow_list
Mention Total Limitmention_total_limit
Enabledenabled"true", "false"
Exempt Rolesexempt_roles
Exempt Channelsexempt_channels
Action Typeaction_type"Block Message", "Send Alert Message", "Timeout"
Action Channel IDaction_channel_id
Action Duration (Seconds)action_duration_seconds
Action Custom Messageaction_custom_message

Outputs

FieldInventScript nameValue
Rule IDrule_id
Server IDserver_id
Namename
Creator IDcreator_id
Enabledenabled
Event Typeevent_type
Trigger Typetrigger_type

Example InventScript

automodRule := modify_automod_rule(Args{server_id: trigger.server_id, rule_id: "..."})
send_text_message(Args{
	channel_id:      trigger.channel_id,
	message_content: "Rule ID: " + automodRule.rule_id,
})

More auto moderation blocks