Skip to content

Commit

Permalink
Adds mention limits in automod (#5212)
Browse files Browse the repository at this point in the history
* Add mention spam

* Fix desc

* Update docs/resources/Auto_Moderation.md

Co-authored-by: advaith <[email protected]>

Co-authored-by: advaith <[email protected]>
  • Loading branch information
Jupith and advaith1 authored Aug 8, 2022
1 parent 451ce0f commit b21abbe
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions docs/resources/Auto_Moderation.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,19 @@ Characterizes the type of content which can trigger the rule.
| HARMFUL_LINK | 2 | check if content contains any harmful links | 1 |
| SPAM | 3 | check if content represents generic spam | 1 |
| KEYWORD_PRESET | 4 | check if content contains words from internal pre-defined wordsets | 1 |
| MENTION_SPAM | 5 | check if content contains more mentions than allowed | 1 |

###### Trigger Metadata

Additional data used to determine whether a rule should be triggered. Different fields are relevant based on the
value of [trigger_type](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-trigger-types).

| Field | Type | Associated Trigger Types | Description |
| -------------- | ----------------------------------------------------------------------------------------------------------------- | ------------------------ | ------------------------------------------------------------------------- |
| keyword_filter | array of strings * | KEYWORD | substrings which will be searched for in content |
| presets | array of [keyword preset types](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-keyword-preset-types) | KEYWORD_PRESET | the internally pre-defined wordsets which will be searched for in content |
| allow_list | array of strings * | KEYWORD_PRESET | substrings which will be exempt from triggering the preset trigger type |
| Field | Type | Associated Trigger Types | Description |
| ------------------- | ----------------------------------------------------------------------------------------------------------------- | ------------------------ | -------------------------------------------------------------------------- |
| keyword_filter | array of strings * | KEYWORD | substrings which will be searched for in content |
| presets | array of [keyword preset types](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-keyword-preset-types) | KEYWORD_PRESET | the internally pre-defined wordsets which will be searched for in content |
| allow_list | array of strings * | KEYWORD_PRESET | substrings which will be exempt from triggering the preset trigger type |
| mention_total_limit | integer | MENTION_SPAM | total number of mentions (role & user) allowed per message (Maximum of 50) |

\* A keyword can be a phrase which contains multiple words. Wildcard symbols (not available to allow lists) can be used to customize how each keyword will be matched.
See [keyword matching strategies](#DOCS_RESOURCES_AUTO_MODERATION/auto-moderation-rule-object-keyword-matching-strategies).
Expand Down

0 comments on commit b21abbe

Please sign in to comment.