automod
list
Get a list of all rules currently configured for the guild
get
Get a single rule
create
Create a new rule
field | type | description |
---|---|---|
name | string | the rule name |
event_type | the event type | |
trigger_type | the trigger type | |
trigger_metadata? | the trigger metadata | |
actions | the actions which will execute when the rule is triggered | |
enabled? | boolean | whether the rule is enabled ( |
exempt_roles? | role_id[] | the role ids that should not be affected by the rule (Maximum of 20) |
exempt_channels? | channel_id[] | the channel ids that should not be affected by the rule (Maximum of 50) |
modify
Modify an existing rule
delete
Delete a rule
classes
Rule
Fields
field | type | description |
---|---|---|
id | Snowflake | |
guild_id | Snowflake | |
name | string | |
creator_id | Snowflake | |
event_type | 1 | |
trigger_type | 1 | 3 | 4 | 5 | |
trigger_metadata | object | |
actions | ||
enabled | boolean | |
exempt_roles | Snowflake[] | |
exempt_channels | Snowflake |
types
EventType
event type | value | description |
---|---|---|
MESSAGE_SEND | 1 | when a member sends or edits a message in the guild |
Action
field | type | description |
---|---|---|
type | the type of action | |
metadata? | additional metadata needed during execution for this specific action type |
ActionType
action type | value | description |
---|---|---|
BLOCK_MESSAGE | 1 | blocks a member's message and prevents it from being posted. A custom explanation can be specified and shown to members whenever their message is blocked. |
SEND_ALERT_MESSAGE | 2 | logs user content to a specified channel |
TIMEOUT | 3 | timeout user for a specified duration |
ActionMetadata
field | type | description |
---|---|---|
channel_id | Snowflake ID | channel to which user content should be logged |
duration_seconds | integer | timeout duration in seconds |
custom_message? | string | additional explanation that will be shown to members whenever their message is blocked |
TriggerMetadata
field | type | description |
---|---|---|
keyword_filter? | string[] | substrings which will be searched for in content (Maximum of 1000) |
regex_patterns? | string[] | regular expression patterns which will be matched against content (Maximum of 10) |
presets? | ( 1 | 2 | 3 )[] | the internally pre-defined wordsets which will be searched for in content |
allow_list? | string[] | substrings which should not trigger the rule (Maximum of 100 or 1000) |
mention_total_limit? | integer | total number of unique role and user mentions allowed per message (Maximum of 50) |
TriggerType
trigger type | value | description |
---|---|---|
KEYWORD | 1 | check if content contains words from a user defined list of keywords |
SPAM | 3 | check if content represents generic spam |
KEYWORD_PRESET | 4 | check if content contains words from internal pre-defined wordsets |
MENTION_SPAM | 5 | check if content contains more unique mentions than allowed |
Last updated