# Permissions

Source: https://righteousbot.dev/docs/getting-started/permissions-model/

The five gates every command passes, in order, and why you can see commands you can't run.

A command runs only if it clears every gate, in the same order on prefix and slash. Each refuses for a different reason, so read the refusal rather than retrying.

| Gate                      | Asks                                                                                                                                                                          | Refusal looks like                  |
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- |
| 1. Discord permission     | Do you hold what the command names? [`,ban`](/commands/moderation/ban/#ban) wants **Ban Members**, [`,config`](/commands/server-tools/config/#config) wants **Administrator** | `Missing permissions: MANAGE_GUILD` |
| 2. Fake permission        | Does a role hold it on Righteous only?                                                                                                                                        | Same as gate 1                      |
| 3. Server owner only      | Are you the owner of this server? [`,antinuke`](/commands/server-tools/antinuke/#antinuke) and [`,fakepermissions`](/commands/server-tools/fakepermissions/#fakepermissions)  | `Server owner only`                 |
| 4. Channel and role rules | Did the server disable the command here, or restrict it to a role?                                                                                                            | The command is refused or ignored   |
| 5. Premium tier           | Does the member or server hold the tier? See [Premium](/docs/getting-started/premium-tiers/)                                                                                  | Names the tier                      |

Gate 1 doesn't answer two things. The bot's own permissions are separate (`I'm missing permissions: …`), and role hierarchy is its own check: a member above you, or the server owner, is out of reach.

## Delegate with fake permissions [#delegate-with-fake-permissions]

[`,fakepermissions`](/commands/server-tools/fakepermissions/#fakepermissions) (`,fp`) grants a role a permission **on Righteous only**, and only the **server owner** can run it. A role with fake `BAN_MEMBERS` can use [`,ban`](/commands/moderation/ban/#ban) without the real permission, and can't ban through Discord's own UI. They apply server-wide, and fake `ADMINISTRATOR` is not real Administrator: it passes every Righteous command's permission gate, but a few checks inside commands (handing out a role, for one) still want the exact permission. Details: [Fake permissions](/docs/protection/fake-permissions/).

<Callout type="warn" title="Server owner is not bot owner">
  "Server owner only" means the owner of your server. A few developer commands are reserved for the bot's owner and refuse with `Owner only`. No server setting opens them.
</Callout>

## Turn a command off in a channel [#turn-a-command-off-in-a-channel]

[`,command`](/commands/server-tools/command/#command) needs **Manage Server**. The channel comes first, then the command. `all` means every channel, including future ones.

<CommandBlock syntax=",command disable <#channel|all> <command> [subcommand]" example=",command disable #general snipe" />

[`,command enable`](/commands/server-tools/command/#command-enable) undoes it, and `enable all` clears every rule for that command. [`,command list`](/commands/server-tools/command/#command-list) shows the rules and [`,command reset`](/commands/server-tools/command/#command-reset) clears them all.

## Restrict a command to a role [#restrict-a-command-to-a-role]

Any one of the roles you add is enough. [`,unrestrict`](/commands/server-tools/unrestrict/#unrestrict) removes one and [`,restrict list`](/commands/server-tools/restrict/#restrict-list) lists them. On slash these are [`/command restrict add`](/commands/server-tools/command/#command-restrict-add) and [`/command unrestrict`](/commands/server-tools/command/#command-unrestrict).

<CommandBlock syntax=",restrict <role> <command> [subcommand]" example=",restrict Moderator lf wk" />

## Turn on Professional Mode [#turn-on-professional-mode]

[`,command professional on`](/commands/server-tools/command/#command-professional) disables the unprofessional and NSFW commands with ordinary server-wide disable rules. Carve one back out with `,command enable all <command>`; `,command list` shows them all.

<CommandBlock syntax=",command professional <on|off>" example=",command professional on" />

<Callout type="warn" title="Administrators and the bot owner skip all of gate 4">
  Disables, restrictions and Professional Mode ignore anyone with Administrator, so testing from an admin account shows nothing. Test from a second account.
</Callout>

## See what someone holds [#see-what-someone-holds]

[`,permissions`](/commands/info/permissions/#permissions) prints real and fake permissions in the spelling a refusal uses. [`/permissions all`](/commands/info/permissions/#permissions-all) lists every name `,fp add` accepts.

<CommandBlock syntax=",permissions [user]" example=",permissions @someone" />

<DiscordEmbed caption="A member with a fake permission. Real permissions are the top list. The footer appears only when a role has been given a fake one." invokedWith=",permissions @Sam" color="#2F3136" author="sam's Permissions" description="&#x22;```\nCREATE_INSTANT_INVITE\nADD_REACTIONS\nVIEW_CHANNEL\nSEND_MESSAGES\nMANAGE_MESSAGES\nEMBED_LINKS\nATTACH_FILES\nREAD_MESSAGE_HISTORY\nUSE_EXTERNAL_EMOJIS\nCONNECT\nSPEAK```&#x22;" fields="[{ name: &#x22;Fake permissions&#x22;, value: &#x22;```BAN_MEMBERS```&#x22; }]" footer="Granted with ,fp — they work on Righteous only, not anywhere else in Discord." />

## You can see commands you cannot run [#you-can-see-commands-you-cannot-run]

Righteous doesn't hide gated slash commands. Every command is visible to `@everyone`, and a member without permission gets a private refusal. Discord's own hiding works on **real** permissions before the bot is asked, which would make fake permissions impossible on slash. The config panel works the same way: controls are checked when used.

## Common issues [#common-issues]

**"Missing permissions" and you have Administrator.** It may be `Server owner only` instead. [`,antinuke`](/commands/server-tools/antinuke/#antinuke) is the usual case.

**A moderator can act in Discord but not through the bot.** The command is restricted to a role they lack, or disabled in that channel. Check [`,command list`](/commands/server-tools/command/#command-list) and [`,restrict list`](/commands/server-tools/restrict/#restrict-list).

**A fake permission does nothing.** Discord's own refusals ignore it. If the refusal names the bot's missing permission, fix the bot's role.

**The refusal names a tier you thought you had.** Boosting, Self Premium, Server Premium and the bot purchase are four things. See [Premium](/docs/getting-started/premium-tiers/).
