Spam Plugin

The spam plugin allows administrators and moderators to limit spam and enforce punishments on spammers. The plugin can be used to limit mass sending of:

  • General Spam
  • Mentions
  • Links
  • Attachments
  • Emojis
  • Newlines
  • Duplicate Messages

Configuration Options

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

Spam Configuration

OptionDescriptionTypeDefault
punishmentSets which action is performed when the spam filter is triggered. Options are: NONE, MUTE, TEMPMUTE, BAN, TEMPBAN, KICKstrnone
punishment_durationRequired for TEMPBAN and TEMPMUTE punishments and determines how many seconds a punishment should lastint300
countHow many times an action should be performed for it to trigger the filterint???
intervalTime period within which the "count" of actions should be performed to trigger the filterint???
max_messagesTotal number of messages that can be sentdictempty
max_mentionsHow many user mentions can be sentdictempty
max_linksHow many links can be sentdictempty
max_attachmentsHow many attachments can be sentdictempty
max_emojisHow many emojis can be sentdictempty
max_newlinesHow many new lines/line breaks can be sentdictempty
max_duplicatesHow many duplicate messages can be sentdictempty
cleanWhether or not the offending messages which triggered spam detection should be deletedboolfalse
clean_countMaximum number of messages to be deletedint100
clean_durationMaximum duration (in seconds) for which to delete messagesint900

Configuration Example

  spam:
    levels:
      0:
        punishment: TEMPMUTE
        punishment_duration: 120
        clean: true
        clean_count: 50
        clean_duration: 500
        max_messages:
          count: 10
          interval: 7
        max_mentions:
          count: 8
          interval: 30
        max_links:
          count: 10
          interval: 60
        max_attachments:
          count: 10
          interval: 60
        max_emojis:
          count: 100
          interval: 120
        max_newlines:
          count: 60
          interval: 120
        max_duplicates:
          count: 5
          interval: 30