> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vetox.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Anti-Raid

> Detect mass-join raids and screen suspicious accounts at the door with configurable join guard conditions. Basic tier.

Anti-Raid does two independent jobs: it reacts to a **flood** of joins, and it screens **individual** accounts as they arrive.

<Info>
  Requires **Basic** premium. Below that the entire page is replaced by pricing — the settings are not shown at all.
</Info>

<Note>
  Anti-Raid also needs its switch on the [Setup](/en/server-management/setup) page. If it is off, this page shows an amber banner and **every control is disabled** until you enable it.
</Note>

## Raid detection

When enough members join within your window, Vetox declares a raid.

| Setting                     | Default  | Range                      |
| --------------------------- | -------- | -------------------------- |
| **Minimum Number of Users** | 15       | **2** to 100               |
| **Interval (in seconds)**   | 5        | 1 to 300                   |
| **Action During Raid**      | Kick     | Kick, Ban or Mute          |
| **Account Age**             | 3 months | 1, 2, 3, 6, 9 or 12 months |

<Warning>
  **Account Age is a filter, not a requirement.** Only accounts **younger** than the threshold are counted toward the raid trigger. Older accounts joining at the same time are ignored entirely.

  Raising it makes Anti-Raid more sensitive, not less.
</Warning>

<Warning>
  **Only the member who trips the threshold is punished.** The earlier joiners in the window are named in your alert but are not kicked, banned or muted.

  If you need everyone in the wave handled, use Join Guard below.
</Warning>

<Note>
  The number inputs let you go below the minimum of 2, but saving that value fails with a generic error. Keep it at 2 or above.
</Note>

## Raid reports

Choose a channel and write a start and end message. Both support variables.

| Variable       | Works in      |
| -------------- | ------------- |
| `[Usernames]`  | Start message |
| `[Users]`      | Start message |
| `[UsersCount]` | Start message |

<Warning>
  Two limitations here:

  * **`[ServerName]` is offered in the picker but never replaced.** It posts as literal text.
  * **The end message substitutes nothing at all.** Any variable you put in it posts literally. Write it as plain text.
</Warning>

<Note>
  `[UsersCount]` excludes the member who triggered the raid, so it reads one lower than your threshold.
</Note>

<Warning>
  **Clearing the report channel does not take effect.** The selector appears to clear, but the old channel is retained and alerts keep going there. The channel visibly reappears after saving.

  To stop alerts, point them at a channel you can archive rather than trying to clear the field.
</Warning>

## Join Guard

Join Guard screens every join individually and runs **independently of the raid threshold** — it acts whether or not a raid is happening. Up to 10 conditions.

### Rules

Each condition holds up to five rules:

| Rule                  | Checks                                                        |
| --------------------- | ------------------------------------------------------------- |
| **Account Age**       | Older or younger than a given number of hours, days or months |
| **Default Avatar**    | The account never set a profile picture                       |
| **No Banner**         | The account has no profile banner                             |
| **Username Contains** | The username contains any of your keywords, one per line      |
| **Generated Name**    | The username matches machine-generated patterns               |

Generated-name detection covers names ending in three or more numbers, starting with numbers, an underscore followed by numbers, numbers followed by an underscore, only numbers, and short random letter-number mixes.

### Matching

Each condition chooses **All rules must match** or **Any rule must match**.

<Warning>
  "Any" with a broad rule such as *default avatar* will act on a large share of ordinary new members. Combine rules and prefer "All" unless you are certain.
</Warning>

### Actions

Up to five per condition: assign a role, kick, ban, timeout for a number of minutes, send a DM, post to a channel, or open a moderation case.

<Note>
  Actions run in order, and **a kick or ban stops everything** — remaining actions on that condition and all later conditions are skipped.

  Put your logging and DM actions **before** any kick or ban, or they will never run.
</Note>

Join Guard messages support a much richer variable set than raid reports, including the member, their account age, the matched rules and the condition name.

## Building a sensible configuration

<Steps>
  <Step title="Start with raid detection alone">
    The defaults handle the obvious case. Leave Join Guard empty at first.
  </Step>

  <Step title="Add one narrow Join Guard condition">
    Combine two or three rules with "All" — a very new account **and** a default avatar **and** a generated name is almost never a real member.
  </Step>

  <Step title="Use a non-destructive action while you watch it">
    Assign a quarantine role and open a case rather than banning. Review for a week.
  </Step>

  <Step title="Tighten only once you trust it">
    Move to kicks or bans after seeing the condition behave on real traffic.
  </Step>
</Steps>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Raids are not detected">
    Check that accounts joining are actually younger than your Account Age threshold — older accounts are never counted.
  </Accordion>

  <Accordion title="Only one member was punished">
    Expected. Raid detection acts on the triggering member only. Use Join Guard to act on every matching join.
  </Accordion>

  <Accordion title="A variable posted as literal text">
    `[ServerName]` is never substituted, and the end message substitutes nothing at all.
  </Accordion>

  <Accordion title="Alerts still go to the old channel">
    Clearing the report channel does not persist. Pick a different channel instead.
  </Accordion>

  <Accordion title="Saving fails with a generic error">
    Usually the user threshold is below 2, or the interval is above 300 seconds. Both are accepted by the form and rejected on save.
  </Accordion>

  <Accordion title="Join Guard skipped my logging action">
    A kick or ban earlier in the action list aborts everything after it. Reorder so logging runs first.
  </Accordion>
</AccordionGroup>

## Related

<CardGroup cols={2}>
  <Card title="Protection" icon="lock" href="/en/moderation/protection">
    Defends against damage from inside.
  </Card>

  <Card title="Auto-Roles" icon="user-plus" href="/en/engagement/auto-roles">
    Delayed roles are a quieter anti-raid measure.
  </Card>
</CardGroup>
