> For the complete documentation index, see [llms.txt](https://miulien.gitbook.io/bot/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://miulien.gitbook.io/bot/en/utilities/permissions.md).

# Command Permissions (permissions)

**Permissions lets server administrators decide which roles may use specific Miulien commands.** You can delegate a bot feature without giving someone unrelated Discord moderation powers. For example, grant a support role access to `reply` without granting Discord's **Manage Messages** permission.

## 🔐 Features

* **Per-command authorization:** Each command has its own list of allowed roles.
* **Multiple roles:** A user with any one of the authorized roles receives the extra permission.
* **Flexible updates:** Add or remove an individual role, or clear all added permissions for a command.
* **Overview:** View all configured command/role permissions in one place.
* **Dynamic command list:** The panel reflects Miulien's registered commands, rather than requiring you to type command names.

These settings are **additional permissions**, not a denylist or strict allowlist. Users who already have the appropriate Discord permissions retain their access even if their roles are not listed.

## ⚙️ Setup

1. Run `/permissions` or `m!permissions` in your Discord server.
2. Choose a command; use pagination if needed.
3. Select **Add allowed roles** and pick the desired role(s).
4. Use **Remove allowed roles**, or **Clear permissions** to revoke a command's additional authorization.
5. Use **View all** to audit the configuration.

This system authorizes **roles**, not individual users. A user's additional access changes when their roles change.

## 🛡️ Discord permissions vs. Miulien permissions

|                             | Native Discord permissions         | Miulien Permissions               |
| --------------------------- | ---------------------------------- | --------------------------------- |
| Scope                       | Discord server and channel actions | Eligible Miulien commands         |
| Configuration               | Discord roles/channel permissions  | Miulien's Permissions panel       |
| Changes native role powers? | Yes, according to your changes     | **No**                            |
| Best for                    | Managing channels or messages      | Delegating a specific bot feature |

Additional permission replaces only **supported user-permission checks**. It does not grant Discord privileges and cannot compensate for missing permissions **on Miulien itself**.

Commands without additional role authorizations continue to use their normal Discord requirements.

## 👑 Who can configure it?

Managing `/permissions` requires Discord's **Manage Server** permission and must be done inside a server.

* Additional authorization cannot bypass the **Manage Server** requirement for the Permissions command itself.
* `@everyone` cannot be added, to avoid granting a command to all members.
* Deleted Discord roles are removed from the saved authorization records.

> Grant access only to roles that need it, and periodically check **View all**.
