discord_set_role_permission
Add or update a role's per-channel permission overwrite, allowing or denying specific permissions while merging with existing settings. Controls what a role can do in a specific channel.
Instructions
Add or update a per-channel permission overwrite for a role, allowing and/or denying specific permissions. Merges with the role's existing overwrite (does not reset it). Denying View Channel to @everyone also locks the bot out unless it holds an allow overwrite of its own; grant that with discord_set_member_permission before the deny. Requires the Manage Roles permission. Use discord_set_member_permission to target a single member instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| deny | No | Permission flag names to deny, e.g. ['SendMessages'] (or the same array JSON-encoded as a string). | |
| allow | No | Permission flag names to allow, e.g. ['SendMessages','ViewChannel'] (or the same array JSON-encoded as a string). Uses Discord PermissionsBitField flag names. | |
| reason | No | Optional reason recorded in the server audit log. | |
| role_id | Yes | ID (snowflake) of the role to grant/deny permissions for. | |
| channel_id | Yes | ID (snowflake) of the channel to set the overwrite on. |