Censor Plugin
The censor plugin provides administrators and moderators a simple way to filter certain types of malicious and offensive content, such as:
- Invite Links
- URLs
- Inappropriate or Offensive words
This, combined with the Spam plugin can result in a very robust automatic abuse-prevention system.
Configuration Options
Option | Description | Type | Default |
---|---|---|---|
levels | A mapping of levels to Censor Configurations. This will match any user with a level that is equal or lower | Dict | Empty |
channels | A mapping of channels to Censor Configurations | Dict | Empty |
Censor Configuation
Option | Description | Type | Default |
---|---|---|---|
filter_zalgo | Whether to filter zalgo text from messages | Bool | True |
filter_invites | Whether to filter invite links from messages | Bool | True |
invites_guild_whitelist | A list of whitelisted guild IDs for invite codes | List | Empty |
invites_whitelist | A list of whitelisted invite codes or vanities | List | Empty |
invites_blacklist | A list of blacklisted invite codes or vanities | List | Empty |
filter_domains | Whether to filter the domains contained within URLs | Bool | True |
domains_whitelist | A whitelist of domain names | List | Empty |
domains_blacklist | A blacklist of domain names | List | Empty |
blocked_tokens | A list of tokens (can appear in the middle of words) that are blacklisted | List | Empty |
blocked_words | A list of words (must be seperated by a boundary) that are blacklisted | List | Empty |
Configuration Example
censor:
levels:
0:
filter_zalgo: true
filter_invites: true
invites_guild_whitelist: [169256939211980800, 324806970538459139]
invites_whitelist: ['discord-developers', 'discord-testers', 'discord-api', 'events', 'discord-linux', 'gamenight', 'discord-feedback']
invites_blacklist: []
filter_domains: true
domains_whitelist: []
domains_blacklist: ['website.net']
blocked_tokens: ['token1', 'token2']
blocked_words: ['word1', 'word2', 'word3']
channels:
290923757399310337:
blocked_words: ['word4']
Note: Every censor configuration setting can be applied to either levels
or channels