Overview
Community Filter is a useful tool to help moderate communities automatically.
The filter is effectively a list of instructions, which runs on every new piece of content, and runs again every time a piece of content is edited.
For instance, you may want to configure the filter to remove any post where the title contains the word yoda
.
You may also want to remove a post where the title contains yoda
, but doesn't contain lemons
, and only if the creator of the post has less than 350 score.
Both of these scenarios are possible.
YAML
The filter can be configured using YAML.
It is not directly compatible with any other platform's filter.
Example Configuration
This is a basic example configuration.
This rule removes posts and comments (note the type
being all
, rather than just post
or comment
) where the post or comment includes one or more bad words: cake
or shine
.
# Bad Words
priority: -100
type: any
domain+content+title (includes): ['cake', 'shine']
action: remove
action_reason: "Includes inappropriate language
This particular example only touches the surface on the capabilities of the filter.
Actions
Action determines what to do when the rule matches.
For example, in the above example we remove
if the content contains cake
or shine
.
We could also use approve
or filter
.
filter
means that the content will be removed, but will be sent to the mod queue for review.
We recommend using filter
over remove
in almost all circumstances, as filters should be an additional tool rather than a replacement for human review.
Multiple Rules
You can have as many distinct rules as you would like.
However, each rule must be followed by ---
, as follows.
# Bad Words
priority: -100
type: any
domain+content+title (includes): ['cake', 'shine']
action: remove
action_reason: "Includes inappropriate language
---
# Good Words
priority: -100
type: any
domain+content+title (includes): ['puppy', 'gold']
action: approve
action_reason: "Includes appropriate language