commands_edit_command_permissions
Set per-command permission overrides for a Discord guild command, specifying role, user, or channel permissions to control access.
Instructions
Purpose: Set per-command permission overrides for one command in a guild.
Auth: This endpoint REQUIRES a user OAuth2 access token (Bearer …), NOT the bot token. The user must have permission to manage the guild AND access to the command. Pass the user access token via bearer_token.
Body: permissions is an array of {id, type, permission} overrides where type is 1=ROLE, 2=USER, 3=CHANNEL.
Returns: updated {id, application_id, guild_id, permissions}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| guild_id | Yes | Guild scope | |
| command_id | Yes | Command ID to edit permissions for | |
| permissions | Yes | Permission overrides - max 100 per command | |
| bearer_token | Yes | Required user OAuth2 access token (NOT bot token). Treated as a credential - do not log. | |
| application_id | Yes | Bot/app application ID |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||