How to Set Discord Slash Command Default Permission to Members With Manage Roles
🔍 WiseChecker

How to Set Discord Slash Command Default Permission to Members With Manage Roles

You want to restrict a slash command so only members who hold the Manage Roles permission can use it. By default, a slash command you create with Discord’s built-in command system is available to every member in the server. This article explains how to change the default permission for a slash command to require the Manage Roles permission. You will learn the exact steps in Server Settings and through the Discord developer portal.

Key Takeaways: Set Default Permission for Slash Commands

  • Server Settings > Integrations > Commands: Override default permission for built-in slash commands per role or member.
  • Discord Developer Portal > Application > Bot > Permissions: Set default member permissions for custom bot slash commands.
  • Default Member Permissions field: Choose “Manage Roles” to restrict command usage server-wide.

ADVERTISEMENT

Overview of Slash Command Default Permissions

Slash commands in Discord can be created by Discord itself known as built-in commands or by custom bots. Each slash command has a default permission setting that determines who can use it without any additional overrides. The default permission can be a specific permission like Manage Roles or a set of permissions. When you set a default permission, only members who have that permission in the server can use the command. Members without the permission will see the command grayed out or will receive an error when they try to use it.

For built-in slash commands such as those added by Discord apps or integrations, you can change the default permission in Server Settings under Integrations. For custom bots you develop, you set the default permission in the Discord Developer Portal when configuring the bot application. In both cases, the permission you choose applies to all members unless you create specific role or member overrides.

Prerequisites

Before you can change default permissions, you must have the following:

  • Manage Server permission in the Discord server to access Server Settings.
  • For custom bots: Access to the Discord Developer Portal and ownership or developer permissions for the bot application.
  • For built-in commands: The command must already be added to the server through an integration or app.

ADVERTISEMENT

Steps to Set Default Permission for Built-in Slash Commands

These steps apply to slash commands that come from Discord apps or integrations you have added to your server, such as a music bot or a moderation bot.

  1. Open Server Settings
    Right-click your server name in the channel list and select Server Settings. Alternatively, click the server name at the top left and choose Server Settings from the dropdown menu.
  2. Go to Integrations
    In the left sidebar, click Integrations. This page lists all apps and bots added to your server.
  3. Select the app or bot
    Find the app or bot that provides the slash command you want to restrict. Click its name or the Manage button next to it.
  4. Click Commands tab
    On the integration page, you will see a Commands tab. Click it to see a list of all slash commands the app provides.
  5. Find the specific command
    Scroll through the list or use the search bar to locate the slash command you want to restrict.
  6. Click the command name
    Click on the command name to open its permission settings.
  7. Set default permission
    Under Default Permission, you will see a list of permissions. Check the box next to Manage Roles. If you want to require multiple permissions, check all that apply. The command will now require the checked permissions to be used.
  8. Save changes
    Click the Save button at the bottom of the panel. The default permission is now applied to all members.

Steps to Set Default Permission for Custom Bot Slash Commands

If you are a bot developer and want to restrict a slash command to members with Manage Roles, you set the default permission in the Discord Developer Portal. This method works for all slash commands your bot registers globally.

  1. Go to Discord Developer Portal
    Open a web browser and navigate to https://discord.com/developers/applications. Log in with your Discord account.
  2. Select your bot application
    From the list of applications, click on the one associated with your bot.
  3. Click Bot on the left sidebar
    In the left navigation, click Bot. This page contains settings for your bot user.
  4. Scroll to Default Member Permissions
    Scroll down to the Default Member Permissions section. This field controls which permissions a member must have to use any command the bot registers.
  5. Select Manage Roles permission
    Click the dropdown or the permission list. Check the box next to Manage Roles. You can select multiple permissions if needed. All commands from this bot will now require at least one of the selected permissions.
  6. Save changes
    Click the Save Changes button at the bottom of the Bot page. The new default permission will apply to all slash commands the bot registers after this change. Existing commands may require a restart or re-registration.

Common Issues and Limitations

Command still usable by members without Manage Roles

If you set the default permission but members without Manage Roles can still use the command, check if there are role or member overrides that grant access. In the built-in command settings, click Add Override to see if any role or member has been explicitly allowed. Remove those overrides. For custom bots, ensure the default member permissions are saved and that the bot has been restarted or commands re-registered.

Default permission applies to all commands, not one

For custom bots, the Default Member Permissions field applies to every command the bot registers. If you need different permissions for different commands, you must use the built-in command override method in Server Settings after adding the bot. In the integration settings, you can override permissions per command as described in the first set of steps.

Permission not showing in the list

If Manage Roles does not appear in the default permission list for a built-in command, the app may not support that permission. Some apps only allow a subset of permissions. In that case, you cannot restrict the command to Manage Roles. You may need to contact the app developer.

Built-in Command vs Custom Bot Default Permission

Item Built-in Command Server Settings Custom Bot Developer Portal
Location Server Settings > Integrations > [App] > Commands Discord Developer Portal > Application > Bot
Scope Per command for a single server All commands for the bot globally
Permissions allowed Only permissions the app supports Any Discord permission
Override possibility Yes, per role or member No, but can be overridden in Server Settings after adding bot
Requires Manage Server Yes No, only developer access

You can now restrict any slash command to members with Manage Roles using either method. For built-in commands, use the Integrations page in Server Settings. For your own bot, set the default member permissions in the Developer Portal. If you need more granular control, combine the global default with per-command overrides in Server Settings.

ADVERTISEMENT