Skip to main content
Discord permissions and role hierarchy decide whether an action is technically possible. On top of that, Petto has its own tools to decide who may run a command: levels from 0 to 100, role restrictions and disabled commands. All of them can be managed from the dashboard’s Permissions page or with prefix commands.
None of this bypasses Discord. A member can have Petto level 100 and still fail if their Discord permissions or Petto’s role hierarchy do not allow the action.

How Petto decides

When someone uses a command, Petto checks, in this order:
  1. Not disabled. !disablecommand turns a command off in the server or in some channels. Nobody skips this.
  2. Discord permission. Commands that change the server ask for the Discord permission of the action, like Ban Members for !ban.
  3. Petto level. A command can need a level from 0 to 100. Members get the level of their groups; everyone has the level of the @everyone group.
  4. Role restriction. !restrictcommand lets only some roles use a command.
The server owner and members with Administrator skip steps 2 to 4.
sam.k tries !remind in #general and Petto says !remind is turned off there, try another channel

In Discord: a command turned off in this channel.

sam.k tries to ban toxic_tom and Petto says the permission ban_members is missing

In Discord: a member without Ban Members tries !ban.

shi has Manage Messages but tries !purge 20 without the level, and Petto says the permission level is missing

In Discord: !purge needs level 20 and shi is in no level group.

shi, a helper, tries to ban toxic_tom and Petto says only members with Moderators can use ban in this server

In Discord: !ban is only for Moderators here.

The examples below use the default ! prefix. The same checks run when a command is used with /: see Slash commands below.

Levels

liam creates the group moderators with level 50

In Discord: a level group made.

liam adds the role Moderators to the group moderators

In Discord: a role put in a group.

liam makes the command ban require level 50

In Discord: a level required for a command.

liam lists the commands with a level: ban 50, lockdown 90 and purge 20

In Discord: the commands that need a level.

  • group create <name> <level> makes a group, and group level <name> <0-100> changes its level.
  • group add-role / remove-role and group add-user / remove-user decide who is in it. group view <name> shows them, and group delete <name> removes it.
  • command set <command> <level> requires a level for a command (0 makes it public again). command list shows the commands with a level.
  • mylevel shows your own level.
liam changes the level of the group helpers to 30

In Discord: the level of a group changed.

liam removes the role Helpers from the group helpers

In Discord: a role taken out of a group.

liam adds Chillet to the group moderators

In Discord: one member put in a group.

liam removes Chillet from the group moderators

In Discord: one member taken out of a group.

liam views the group moderators: level 50, the role Moderators and Chillet

In Discord: the level, roles and members of a group.

liam deletes the group helpers, then trying to delete @everyone Petto says it cannot be deleted

In Discord: a group deleted; the @everyone group cannot be.

A member gets the highest level of every group they match, by role or by user. Every server also has an @everyone group (level 0 at the start) that everybody is in; it cannot be deleted. A command with no level is open to members who pass its Discord permission check. !permission needs Manage Server (aliases !auth and !pgroup).
liam lists four groups (@everyone 0, helpers 20, moderators 50, admins 90) and kira sees her level is 50

In Discord: the level groups of the server, and a moderator's own level.

Role restrictions

!restrictcommand (aliases !rc, !restrict, !restrictcmd) makes a command usable only by members with one of the roles you choose, as a prefix or a slash command.
liam restricts ban to Moderators and then to Admin too, and Petto confirms each one

In Discord: !ban restricted to Moderators, then Admin added (add is the default).

liam removes Admin from ban, which Moderators can still use, then removes purge without a role and it is open again

In Discord: one role taken off a command, then a command opened to everyone again.

liam lists three restricted commands: ban, lockdown and purge with their roles

In Discord: every restricted command and its roles.

liam resets the restrictions and Petto says 5 rules were removed

In Discord: every restricted command opened at once.

liam tries @everyone and the command baan, and Petto refuses each one with its reason

In Discord: @everyone, and a command that does not exist, are refused.

add is the default, so !rc ban @Moderators is the same as !rc add ban @Moderators. Adding more roles to the same command lets any of them use it. remove without a role opens the command to everyone again, and reset opens every restricted command. The owner and administrators can always use them. Needs Manage Server.

The Permissions page

Dashboard → Security → Permissions shows the four steps above and lets you:
  • Level groups: make groups, set their level, and add roles or members (by ID). The @everyone group is the level of everybody.
  • Who can use what: pick a role and see, command by command, whether its members can use it and why (disabled, needs a Discord permission, needs a level, only for some roles). Filter by commands with a level, restricted to roles or open to everyone, and search by name or alias.
  • See the commands with a level, the role restrictions and the disabled commands, including the ones set from Discord.
The Permissions page with 4 level groups, 3 commands with a level, 1 restricted to roles and 3 disabled, and the groups with their roles

Dashboard → Security → Permissions: the counts, the four steps and the level groups.

Who can use what with @Moderators picked (109 of 180 commands, level 50) and the commands filtered by The role cannot use, each with its reason

Dashboard → Security → Permissions → Who can use what: Moderators previewed, with the commands they cannot use and why.

The Commands card with the filter With a level: ban at 50 for moderators and restricted to Moderators, purge at 20 for helpers, lockdown at 90 for admins

Dashboard → Security → Permissions → Commands: filtered by With a level, each with its Discord permission, roles and level.

Slash commands

The everyday commands (/ban, /purge, /channel, /ticket, /embed and the rest) also work from Discord’s / menu. Two things decide whether a member can use one:
  1. Discord shows it or hides it. Each moderation slash command asks Discord for the permission of its action, so the menu hides /ban and /unban from members without Ban Members, /kick without Kick Members, /warn and /timeout without Moderate Members, /purge without Manage Messages and /channel without Manage Channels. /embed, /giveaway, /setup, /vanity and /guildtag need Manage Server.
  2. Petto checks it exactly as it checks the prefix form: disabled commands, levels and role restrictions apply the same way.
To let a role use a hidden slash command without giving it the Discord permission (for example, a role you picked for ban in !moderation), allow the command for that role in Server Settings → Integrations → Petto. Discord then shows it to them, and Petto’s own checks decide the rest. The prefix form never depends on this setting.

Command coverage

Dashboard → Security → Command coverage shows how the staff commands are protected: how many of them have a Petto level, a role restriction or are disabled, and which ones only rely on the Discord permission of the action. Each command says which of these protects it, and Set levels and roles takes you to the Permissions page.
The Command coverage page: the share of staff commands with extra protection, the count by kind and the commands of Moderation with their tags

Dashboard → Security → Command Coverage: how the staff commands are protected, command by command.

Relying only on the Discord permission is fine for most servers. Add a level or a role restriction when you want a command to need more than the permission, for example a !ban that only senior moderators can use even though more roles have Ban Members.