> ## Documentation Index
> Fetch the complete documentation index at: https://docs.misery.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 lose access to things until you restore. Try `,killswitch preview` first to see what it would hit.

> [!NOTE]
>
> Limited to the **server owner** and **antinuke admins**.

> [!TIP]
>
> Put misery's role **above** every other role in the server so it can reach all of them.

## Pulling the switch

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

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

> [!NOTE]
>
> There's a cooldown between uses. If you've just run it, misery tells you how long to wait.

### 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
```

Lists every role carrying a dangerous permission. 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.

## Finding who caused it

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

Groups recent 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.

## Undoing it

Once the incident is handled:

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

misery 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.

## Lockdown

For a full emergency stop, lockdown punishes **every** non-owner action — even from whitelisted users, whitelisted bots, and antinuke admins — and reverts what it can until you turn it off.

```javascript Syntax theme={null}
,killswitch lockdown (on or off)
```

```javascript Example theme={null}
,killswitch lockdown on
```

Choose what happens to anyone who acts during a lockdown:

```javascript Syntax theme={null}
,killswitch punishment (ban, kick, or stripstaff)
```

```javascript Example theme={null}
,killswitch punishment ban
```

`,killswitch status` shows whether a lockdown is active.

> [!WARNING]
>
> Turning lockdown on and off is **server owner** only.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.