---
title: "Restrict a command to certain roles"
description: "Every command Bond builds can be limited to specific roles or a Discord permission, so staff commands stay staff-only."
canonical_url: "https://www.bondbot.gg/use-cases/restrict-commands-to-roles"
last_updated: "2026-10-05"
---

# Restrict a command to certain roles

Every command Bond builds can be limited to specific roles or a Discord permission, so staff commands stay staff-only.

Categories: Custom slash commands, Roles & permissions.

## The request

"@Bond Make the /warn command only usable by the Mod role"

## What Bond does after the first message

- Create a custom slash command for this server, such as /rank, /daily or /profile. (`create_custom_command`)
- List every custom slash command this server has, with its kind, enabled state, Discord registration status and usage counts. (`list_custom_commands`)
- Get the full definition of one custom slash command: what it runs, its options, who may use it, whether Discord has it registered, and its last few runs. (`get_custom_command`)
- Update an existing custom slash command's description, body, options, access restrictions, ephemeral setting, confirmation step or enabled state. (`update_custom_command`)
- Delete a custom slash command from this server and unregister it from Discord. (`delete_custom_command`)
- Dry-run a custom slash command before it is saved, so a broken one is caught first. (`test_custom_command`)
- List all roles in the Discord server, sorted by position (highest position = most authority). (`list_roles`)
- Look up one role by ID or exact name, even one above Bond's own roles, and whether Bond can manage it. (`get_role`)
- Create a role with permissions, display settings, icon or Unicode emoji, and a solid, gradient or holographic color. (`create_role`)
- Delete a role from the Discord server, removing it from every member who has it. (`delete_role`)
- Assign one role to one member, identified by ID or by name. (`assign_role`)
- Remove one role from one member, identified by ID or by name. (`remove_role`)

See also: [all custom slash commands tools](https://www.bondbot.gg/tools/custom-commands), [all roles & permissions tools](https://www.bondbot.gg/tools/roles-permissions).

## More in commands and panels

- [Create custom slash commands](https://www.bondbot.gg/use-cases/custom-slash-commands): Ask for a command and get a real Discord slash command with typed arguments and per-role access, registered in your server.
- [Set up a support ticket system](https://www.bondbot.gg/use-cases/ticket-system): A button that opens a private thread between the member and your support team, with a close button and a summary in a staff-only log.
- [Collect applications with a form command](https://www.bondbot.gg/use-cases/application-forms): A slash command with typed questions like age, timezone and why they want the role, that saves the answers and posts them for staff to read.
- [Set up a suggestion box](https://www.bondbot.gg/use-cases/suggestion-box): A command that posts suggestions to a channel with voting reactions already on them, and keeps a record you can search later.
