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

# Fake permissions

> Let a role use moderation commands without granting the real Discord permission.

Discord's permission system is all-or-nothing. To let a trial moderator use `!ban`, you normally have to give their role **Ban Members** — which also lets them ban people through Discord's own UI, through any other bot in the server, and through the API.

Fake permissions decouple those. A role granted `ban_members` as a fake permission can run `!ban` through mira and nothing else. Take away their access to the bot and the ability goes with it.

<Info>
  Fake permissions only apply to **mira's own commands**. They are not real Discord permissions and are invisible to every other bot.
</Info>

## Granting

<CodeGroup>
  ```javascript To a role theme={null}
  !fakepermissions grant @Trial Mod ban_members
  ```

  ```javascript To a specific member theme={null}
  !fakepermissions grant @someone manage_messages
  ```

  ```javascript Explicitly scoped theme={null}
  !fakepermissions role grant @Trial Mod kick_members
  !fakepermissions member grant @someone moderate_members
  ```
</CodeGroup>

The bare `grant` form figures out whether you passed a role or a member. The `role` and `member` subcommands exist for when a name is ambiguous.

Aliases for `grant`: `allow`, `add`, `give`.

## Revoking

<CodeGroup>
  ```javascript One permission theme={null}
  !fakepermissions revoke @Trial Mod ban_members
  ```

  ```javascript Everything from one target theme={null}
  !fakepermissions reset @Trial Mod
  ```

  ```javascript Everything, server-wide theme={null}
  !fakepermissions reset
  ```
</CodeGroup>

Aliases for `revoke`: `remove`, `rm`, `delete`, `del`. Aliases for `reset`: `clear`, `purge`, `wipe`.

## Viewing

```javascript theme={null}
!fakepermissions list
!fakepermissions list @Trial Mod
!fakepermissions role list
!fakepermissions member list
```

The bare `list` shows every grant in the server, grouped by target. Pass a role or member to filter.

## What you can grant

Any Discord permission name, written in lowercase with underscores. The useful ones:

| Permission           | Unlocks                                                    |
| -------------------- | ---------------------------------------------------------- |
| `ban_members`        | `ban`, `unban`, `softban`, `tempban`, `hardban`, `massban` |
| `kick_members`       | `kick`                                                     |
| `moderate_members`   | `timeout`, `untimeout`, `mute`, `unmute`                   |
| `manage_messages`    | `purge`, `warn`, `impersonate`                             |
| `manage_roles`       | `role`, `temprole`, `jail`, `lockdown`                     |
| `manage_channels`    | `slowmode`, `topic`, `hide`, `reveal`, `nuke`, `drag`      |
| `manage_nicknames`   | `nickname`, `forcenickname`, `fix`                         |
| `manage_guild`       | Most configuration commands                                |
| `manage_expressions` | `emoji`, `sticker`                                         |
| `manage_threads`     | `thread`, `autothread`                                     |
| `manage_webhooks`    | `webhook`, `reskin`                                        |
| `administrator`      | Everything                                                 |

The full list is whatever Discord itself accepts. If a name isn't valid, the command tells you.

<Warning>
  Fake permissions don't bypass **Discord's** requirements. A trial mod with fake `ban_members` can run `!ban`, but the ban itself is performed by mira using *its* permissions — so mira still needs real Ban Members, and its role still has to sit above the target's highest role.

  Role hierarchy is also still checked against the person running the command: someone can't ban a member whose top role is above their own, fake permission or not.
</Warning>

## A practical setup

A trial moderator who can warn, purge and timeout, but can't ban, kick, or touch roles:

```javascript theme={null}
!fakepermissions grant @Trial Mod manage_messages
!fakepermissions grant @Trial Mod moderate_members
```

Give the role no real Discord permissions at all. They get exactly those three abilities, only through the bot, and revoking them is one command.

<Tip>
  Pair this with [command restrictions](/security/command-access#restricting-commands-to-roles) to be even more precise. `manage_messages` unlocks `purge`, `warn` **and** `impersonate` — if you'd rather they couldn't impersonate people, `!command restrict @Trial Mod impersonate` closes that off.
</Tip>

## Command reference

| Command                                               | Aliases                                           | Description          |
| ----------------------------------------------------- | ------------------------------------------------- | -------------------- |
| `fakepermissions`                                     | `permissions`, `fakeperms`, `fp`, `perms`, `cmdx` | Overview             |
| `fakepermissions grant <target> <permission>`         | `allow`, `add`, `give`                            | Grant a permission   |
| `fakepermissions revoke <target> <permission>`        | `remove`, `rm`, `delete`                          | Revoke one           |
| `fakepermissions reset [target]`                      | `clear`, `purge`, `wipe`                          | Remove all grants    |
| `fakepermissions list [target]`                       | `ls`, `view`                                      | View grants          |
| `fakepermissions role grant <role> <permission>`      | —                                                 | Role-scoped grant    |
| `fakepermissions role revoke <role> <permission>`     | —                                                 | Role-scoped revoke   |
| `fakepermissions role list [role]`                    | —                                                 | Role grants only     |
| `fakepermissions member grant <member> <permission>`  | —                                                 | Member-scoped grant  |
| `fakepermissions member revoke <member> <permission>` | —                                                 | Member-scoped revoke |
| `fakepermissions member list [user]`                  | —                                                 | Member grants only   |

Managing fake permissions requires **Administrator** — otherwise anyone with the ability to grant them could grant themselves everything.
