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

# Killswitch

> Cut every role's dangerous permissions when your server is under attack.

## What this is for

If a moderator account gets compromised or a bot goes rogue mid-raid, killswitch strips the permissions being abused from every role at once. It buys you time to work out who's responsible without hunting through role settings while damage is still happening.

<Warning>
  This is a last-resort tool. It touches every role in your server, and members will lose access to things until you restore. Try `,killswitch preview` first to see what it would hit.
</Warning>

<Info>
  Limited to the **server owner** and **antinuke admins**. Confine needs **Administrator**.
</Info>

<Tip>
  We suggest you to put confine's role **above** every other role in the server.
</Tip>

## Pulling the switch

```javascript theme={null}
,killswitch
```

Confine shows you how many roles will be affected and asks you to confirm. Once you do, it works through them at a paced rate to avoid Discord's limits — expect it to take up to a minute on a large server.

<Info>
  There's a cooldown between uses. If you've just run it, confine tells you how long to wait.
</Info>

### Bots only

When the problem is clearly a bot rather than a member, this leaves your staff roles alone:

```javascript theme={null}
,killswitch bots
```

## Seeing what it would do

```javascript theme={null}
,killswitch preview
```

<Frame>
  <img src="https://mintcdn.com/confine/jXARk96XuymWUbid/images/Screenshot-2026-08-17-170955.png?fit=max&auto=format&n=jXARk96XuymWUbid&q=85&s=00614d150d76c67584331e471436873d" alt="Screenshot 2026 08 17 170955" width="302" height="282" data-path="images/Screenshot-2026-08-17-170955.png" />
</Frame>

Lists every role carrying a dangerous permission, flagging which ones belong to integrations. Nothing is changed.

<Tip>
  Worth running once while things are calm, so you know what the real thing would do before you ever need it.
</Tip>

## Finding who caused it

```javascript theme={null}
,killswitch audit
```

Groups the last 30 minutes of destructive audit log entries by who performed them — bans, kicks, channel and role deletions — sorted by volume. This is usually how you identify the compromised account.

<Info>
  Needs **View Audit Log**.
</Info>

## Undoing it

Once the incident is handled:

```javascript theme={null}
,killswitch restore
```

Confine puts every role back to the permissions it held before the killswitch ran, using the snapshot it saved at the time.

<Warning>
  **Server owner only** — antinuke admins can trigger a killswitch but can't restore from one.
</Warning>
