Anti Raid

Understand how Anti Raid heuristics can protect your community from those very undesirable "raid" accounts.

SajuukBot will be ceasing operations on March 31st 2024, due to a variety of factors. For more information, please refer to the announcement provided on the SajuukBot discord server and your options for migrating to a new bot.

This functionality is best left for larger communities that regularly see issues with raiding. While there is no harm in turning it on and configuring it, it can sometimes lead to false positives in non-raid situations, due to members accidentally performing actions that the bot registers as being "raid like". You have been warned!

So you've got a large community, its active and the auto moderators are keeping your community safe from the random case of trolls spamming or being disruptive. But then, out of nowhere, you get raided by 50+ accounts spamming a channel into oblivion.

This is where SajuukBots' Anti Raid module comes in. With the two filters available, Joins and Messages, SajuukBot can intelligently monitor for raid-like behaviour. Most raids have commonalities:

  • The person who initiates a raid usually has all the accounts join simultaneously. The joins filter allows for easy detection of these accounts by looking for a mass of joins in a relatively short period of time, allowing punishment of mutes, kicks or bans to be applied.

  • The raid accounts almost always spam the same message content over and over in a channel. SajuukBot can intelligently discount regular heuristic filters when it realises that there are a significant portion of messages coming from multiple users in a large way, allowing it to recognise message raiding and perform mass cleanup and punishment actions against all the raid accounts. This keeps your community very safe from trolls.

Configuration

This section of configuration needs to be placed under the anti spam module as an indented element. Please see the full basic configuration for more details on how it should be formatted.

  anti raid:
    enabled: false
    joins:
      enabled: false
      trigger: 50
      punishment: mute
      time: 60
      change level: false
    messages:
      enabled: false
      trigger: 30
      punishment: mute
      time: 15
      change level: false
    new accounts:
      enabled: false
      trigger: 15
      time: 45
      punishment: kick
      change level: true
      account age: 14

Settings

Each tab contains more details on each setting described in the configuration above

Please be aware that, even though an optional level can be defined for both anti-raid filters, as well as globally in the Primary configuration settings, it is entirely worthless to define one for the joins and new accounts filters. That's because, when a user joins, they won't have any roles when the code is fired so there is nothing to be excluded from.

You may find it useful to define one for the Messages anti-raid however, to avoid any issues in active channels, though the default level is automatically applied if one is not given.

Core

SettingDescription

enabled

Globally toggles the anti-raid system on or off. If this has been disabled, none of the anti-raid filters will be available.

level

The minimum level at which a user is automatically exempted from the anti-raid functionality.

This setting is optional, but it is also "global" to all anti-raid filters and will be used if no specific level has been defined in a filter.

Joins

SettingDescription

enabled

Toggles the "Too Many Joins" anti-raid filter. If this is disabled, the bot will not action against excessive member joins.

trigger

The number of users that need to join the guild to count as having violated the constraints.

punishment

The action to be taken by the bot for any filter violations. Possible values that may be given are kick, mute and ban

time

The amount of time in which the trigger value needs to be reached to count as having violated the constraints.

EG: If trigger equals 50 and time equals 60, that means 50 members need to join within 60 seconds to cause the bot to take action.

change level

Whether to change the guild's Verification Level to Very High. Doing this is recommended because it will require accounts to verify their phone number, something bots generally can't do.

This requires the bot to have the Manage Server permission.

Messages

SettingDescription

enabled

Toggles the "Too Many Messages " anti-raid filter. If this is disabled, the bot will not action against excessive messaging behaviours.

trigger

The number of messages that need to be sent by multiple members to count as having violated the constraints.

punishment

The action to be taken by the bot for any filter violations. Possible values that may be given are kick, mute and ban

time

The amount of time in which the trigger value needs to be reached to count as having violated the constraints.

EG: If trigger equals 30 and time equals 15, that means 30 messages from multiple members need to be sent within 60 seconds to cause the bot to take action.

change level

Whether to change the guild's Verification Level to Very High. Doing this is recommended because it will require accounts to verify their phone number, something bots generally can't do.

This requires the bot to have the Manage Server permission.

New Accounts

enabled

Toggles the "Too Many New Accounts" anti-raid filter. If this is disabled, the bot will not action against excessive member joins involving new accounts.

trigger

The number of new user accounts that need to join the guild to count as having violated the constraints.

punishment

The action to be taken by the bot for any filter violations. Possible values that may be given are kick, mute and ban

time

The amount of time in which the trigger value needs to be reached to count as having violated the constraints.

EG: If trigger equals 50 and time equals 60, that means 50 members need to join within 60 seconds to cause the bot to take action.

change level

Whether to change the guild's Verification Level to Very High. Doing this is recommended because it will require accounts to verify their phone number, something bots generally can't do.

This requires the bot to have the Manage Server permission.

account age

How young the account must be to be considered "new". This value is expressed in days. Accounts are considered new when their account was created before this value. For example, if you configure this to 7, then the filter will action against accounts which are 7 days or newer.

Last updated