# Moderation

> Security provides moderation commands with a built-in permission system. Moderators can operate with zero Discord permissions while still being protected by Anti-Nuke limits.

## Why Use Security's Moderation?

| Feature                        | Benefit                                             |
| ------------------------------ | --------------------------------------------------- |
| **Zero Permission Moderation** | Moderators don't need dangerous Discord permissions |
| **Limit Protection**           | Anti-Nuke limits apply to all moderation commands   |
| **Audit Trail**                | All actions are logged for accountability           |
| **Custom Permissions**         | Grant specific command access per user              |

## Available Commands

| Command      | Description                                 |
| ------------ | ------------------------------------------- |
| `/ban`       | Permanently ban a member                    |
| `/kick`      | Remove a member from the server             |
| `/softban`   | Ban and immediately unban (clears messages) |
| `/unban`     | Remove a ban                                |
| `/mute`      | Prevent a member from sending messages      |
| `/unmute`    | Remove a mute                               |
| `/lock`      | Lock a specific channel                     |
| `/lockall`   | Lock all channels                           |
| `/unlock`    | Unlock a specific channel                   |
| `/unlockall` | Unlock all channels                         |
| `/clear`     | Delete messages in bulk                     |

## Who Can Use Commands?

Commands can be used by:

1. **Users with Administrator permission** and a higher role than the target
2. **Users with the relevant Discord permission** (e.g., Ban Members) and a higher role
3. **Users with Security's custom permission** for that command

## Security's Permission System

The safest way to grant moderation access. Users with custom permissions:

* Don't need Discord permissions
* Can't bypass Anti-Nuke limits
* Can only use specifically granted commands

### Add Permission

```
/permission add
```

1. Type `/permission add`
2. Select the user
3. Select the permission to grant
4. Send the command

### Remove Permission

```
/permission remove
```

1. Type `/permission remove`
2. Select the user
3. Select the permission to remove
4. Send the command

### View User Permissions

```
/permission view_user
```

1. Type `/permission view_user`
2. Select the user
3. Send the command

### View Users with Permission

```
/permission view_permission
```

1. Type `/permission view_permission`
2. Select the permission
3. Send the command

### Reset User Permissions

```
/permission reset
```

1. Type `/permission reset` (or `/permission reset_id` for user ID)
2. Select the user or enter the ID
3. Send the command

## Best Practices

* **Use custom permissions** instead of Discord permissions for moderators
* **Grant only necessary permissions** - don't give ban access if they only need mute
* **Regularly audit permissions** to remove former staff
* **Set appropriate limits** in Anti-Nuke based on expected moderation volume

## Related

* [Anti-Nuke](https://docs.securitybot.gg/anti-nuke/anti-nuke) - Limits that apply to moderation commands
* [Whitelist](https://docs.securitybot.gg/whitelist/whitelist) - Exempt trusted moderators from limits
* [Logs](https://docs.securitybot.gg/other-modules/logs) - Track moderation actions


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.securitybot.gg/other-modules/moderation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
