Spam

Plugin name: spam

Plugin name: spam

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
  • Upper case letters

Configuration Options

OptionDescriptionTypeDefault
rolesA mapping of roles to spam configurations.dictempty
levelsA mapping of levels to spam configurations. This will match any user with a level that is equal or below.dictempty

Spam Configuration

OptionDescriptionTypeDefault
max_messagesMax count of messages that can be sent in interval. Requires a check subconfiguration.dictempty
max_mentionsMax count of user mentions that can be sent in interval. Requires a check subconfiguration.dictempty
max_linksMax count of links that can be sent in interval. Requires a check subconfiguration.dictempty
max_upper_caseMax count of upper case letters (does not have to be consecutive) that can be sent in interval. Requires a check subconfiguration.dictempty
max_emojisMax count of emojis that can be sent in interval. Requires a check subconfiguration.dictempty
max_newlinesMax count of new lines/line breaks that can be sent in interval. Requires a check subconfiguration.dictempty
max_attachmentsMax count of attachments that can be sent in interval. Requires a check subconfiguration.dictempty
max_duplicatesMax count of duplicate messages that can be sent in interval. Requires a check subconfiguration.dictempty
punishmentSets a punishment when spam detection is triggered. Options: NONE, MUTE, TEMPMUTE, BAN, TEMPBAN, KICKstrNONE
punishment_durationRequired for TEMPBAN and TEMPMUTE punishments. Seconds that a punishment should last.int300
channel_whitelistList of whitelisted channels that will not trigger spam detection for the action.list(snowflake)[]
cleanWhether or not messages that triggered the spam filter should be deleted.boolfalse
clean_countMaximum number of messages to be deleted.int100
clean_durationDuration in seconds in which messages should be deleted.int900

Check Subconfiguration

OptionDescriptionTypeDefault
countNumber of times an action is performed in interval to trigger the punishment.intN/A
intervalSeconds within which a user with over count actions will trigger a punishment.intN/A
punishmentSets a punishment when spam detection is triggered. If unset, it will use the overall configuration setting by default. Options: NONE, MUTE, TEMPMUTE, BAN, TEMPBAN, KICKstrunset
punishment_durationRequired for TEMPBAN and TEMPMUTE punishments. Seconds that a punishment should last. If unset, it will use the overall configuration setting by default.intunset
channel_whitelistList of whitelisted channels that will not trigger spam detection for the action.list(snowflake)[]

Configuration Example

plugins:
  spam:
    levels:
      49:
        punishment: TEMPMUTE
        punishment_duration: 120
        clean: true
        clean_count: 50
        clean_duration: 500
        channel_whitelist: [390107999022350336]
        max_newlines:
          count: 60
          interval: 120
          channel_whitelist: [439205512425504771]
        max_duplicates:
          count: 5
          interval: 30
          channel_whitelist: [439205512425504771]
    roles:
      580569967364407316:
        punishment: NONE
        punishment_duration: 10
        clean: true
        max_mentions:
          count: 3
          interval: 30
  infractions:
    mute_role: 579398816072073246