channels_modify_permissions
Sets or replaces a role or user permission overwrite on a Discord channel, specifying allowed and denied permissions for that target.
Instructions
Purpose: Create or replace a permission overwrite for a role or user on a channel.
When to use:
Restrict a channel to a specific role; allow a moderator to manage messages.
When NOT to use:
Removing the overwrite entirely → use
channels_delete_permissions.
type: 0 = role overwrite, 1 = member overwrite. allow/deny are stringified bitfields.
Returns: {updated, channel_id, overwrite_id}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| deny | No | Permission bitfield to deny (string of integer bits) | |
| type | Yes | 0 = role, 1 = member | |
| allow | No | Permission bitfield to allow (string of integer bits) | |
| channel_id | Yes | Channel whose overwrite is being set | |
| audit_reason | No | Reason recorded in audit log (X-Audit-Log-Reason header) | |
| overwrite_id | Yes | Role ID or user ID receiving the overwrite |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||