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

OptionDescriptionTypeDefault
levelsA mapping of levels to Censor Configurations. This will match any user with a level that is equal or lowerdictempty
channelsA mapping of channels to Censor Configurationsdictempty

Censor Configuration

OptionDescriptionTypeDefault
filter_zalgoWhether to filter zalgo text from messagesbooltrue
filter_invitesWhether to filter invite links from messagesbooltrue
invites_guild_whitelistA list of whitelisted guild IDs for invite codeslistempty
invites_whitelistA list of whitelisted invite codes or vanitieslistempty
invites_blacklistA list of blacklisted invite codes or vanitieslistempty
filter_domainsWhether to filter the domains contained within URLsbooltrue
domains_whitelistA whitelist of domain nameslistempty
domains_blacklistA blacklist of domain nameslistempty
blocked_tokensA list of tokens (can appear in the middle of words) that are blacklistedlistempty
blocked_wordsA list of words (must be seperated by a boundary) that are blacklistedlistempty

Configuration Example

  censor:
    levels:
      0:
        filter_zalgo: true
        filter_invites: true
        invites_guild_whitelist: [205769246008016897, 272885620769161216]
        invites_whitelist: ['discord-developers', 'discord-testers', 'discord-api', 'discord-linux']
        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