channels_modify_permissions
channels_modify_permissions
Section titled “channels_modify_permissions”Category: channels
Create or replace a permission overwrite for a role or user on a channel.
When to use
Section titled “When to use”- Restrict a channel to a specific role; allow a moderator to manage messages.
When NOT to use
Section titled “When NOT to use”- Removing the overwrite entirely → use
channels_delete_permissions.
| Field | Type | Required | Description |
|---|---|---|---|
channel_id | string | yes | Channel whose overwrite is being set |
overwrite_id | string | yes | Role ID or user ID receiving the overwrite |
type | unknown | yes | 0 = role, 1 = member |
allow | string | no | Permission bitfield to allow (string of integer bits) |
deny | string | no | Permission bitfield to deny (string of integer bits) |
audit_reason | string | no | Reason recorded in audit log (X-Audit-Log-Reason header) |
Returns
Section titled “Returns”\{updated, channel_id, overwrite_id\}.
Output schema
Section titled “Output schema”| Field | Type | Required | Description |
|---|---|---|---|
updated | boolean | yes | |
channel_id | string | yes | Discord channel ID (snowflake) |
overwrite_id | string | yes |
Annotations
Section titled “Annotations”| Property | Value |
|---|---|
| Read-only | no |
| Destructive | no |
| Idempotent | yes |
| Open-world | yes |
| Confirmation required | no |