# Set Channel Permissions

> Set allowed and denied permission overrides for a user or role in a channel. Supports setting both allow and deny in one block, and can either replace existing overrides or update them.

- ID: `set_channel_permissions`
- Type: Block
- Category: [Channels](https://inventor.bot/docs/reference/blocks/channels.md)

**Inputs**

| Name | Required | Description | Value |
| --- | --- | --- | --- |
| `channel_id` | yes | ID of the channel to set permissions for. |  |
| `target_type` | yes | Whether the permission overwrite applies to a user or a role. | `"User"`, `"Role"` |
| `target_id` | yes | ID of the user or role to set permissions for. You can type @everyone as a shortcut to the @everyone role ID. |  |
| `server_id` |  | Required when using @everyone as the target. |  |
| `allow_permissions` |  | Permissions to explicitly allow. | `"Add Reactions"`, `"Administrator"`, `"Attach Files"`, `"Ban Members"`, `"Bypass Slowmode"`, `"Change Nickname"`, `"Connect"`, `"Create Events"`, `"Create Expressions"`, `"Create Instant Invite"`, `"Create Private Threads"`, `"Create Public Threads"`, `"Deafen Members"`, `"Embed Links"`, `"Kick Members"`, `"Manage Channels"`, `"Manage Events"`, `"Manage Expressions"`, `"Manage Messages"`, `"Manage Nicknames"`, `"Manage Roles"`, `"Manage Server"`, `"Manage Threads"`, `"Manage Webhooks"`, `"Mention Everyone"`, `"Move Members"`, `"Mute Members"`, `"Pin Messages"`, `"Priority Speaker"`, `"Read Message History"`, `"Request to Speak"`, `"Send Messages"`, `"Send Messages in Threads"`, `"Send Polls"`, `"Send TTS Messages"`, `"Send Voice Messages"`, `"Set Voice Channel Status"`, `"Speak"`, `"Stream"`, `"Timeout Members"`, `"Use Application Commands"`, `"Use Embedded Activities"`, `"Use External Apps"`, `"Use External Emojis"`, `"Use External Sounds"`, `"Use External Stickers"`, `"Use Soundboard"`, `"Use VAD"`, `"View Audit Log"`, `"View Channel"`, `"View Creator Monetization Analytics"`, `"View Guild Insights"` |
| `deny_permissions` |  | Permissions to explicitly deny. | `"Add Reactions"`, `"Administrator"`, `"Attach Files"`, `"Ban Members"`, `"Bypass Slowmode"`, `"Change Nickname"`, `"Connect"`, `"Create Events"`, `"Create Expressions"`, `"Create Instant Invite"`, `"Create Private Threads"`, `"Create Public Threads"`, `"Deafen Members"`, `"Embed Links"`, `"Kick Members"`, `"Manage Channels"`, `"Manage Events"`, `"Manage Expressions"`, `"Manage Messages"`, `"Manage Nicknames"`, `"Manage Roles"`, `"Manage Server"`, `"Manage Threads"`, `"Manage Webhooks"`, `"Mention Everyone"`, `"Move Members"`, `"Mute Members"`, `"Pin Messages"`, `"Priority Speaker"`, `"Read Message History"`, `"Request to Speak"`, `"Send Messages"`, `"Send Messages in Threads"`, `"Send Polls"`, `"Send TTS Messages"`, `"Send Voice Messages"`, `"Set Voice Channel Status"`, `"Speak"`, `"Stream"`, `"Timeout Members"`, `"Use Application Commands"`, `"Use Embedded Activities"`, `"Use External Apps"`, `"Use External Emojis"`, `"Use External Sounds"`, `"Use External Stickers"`, `"Use Soundboard"`, `"Use VAD"`, `"View Audit Log"`, `"View Channel"`, `"View Creator Monetization Analytics"`, `"View Guild Insights"` |
| `operation_mode` | yes | "Replace Existing Overrides" clears the target's current permission overrides before applying the new ones. "Update Existing Overrides" merges the new permissions into the existing ones, leaving unrelated permissions unchanged. | `"Replace Existing Overrides"`, `"Update Existing Overrides"` |

**Example**

```go
set_channel_permissions(Args{
	channel_id:     trigger.channel_id,
	target_type:    "User",
	target_id:      "...",
	operation_mode: "Replace Existing Overrides",
})
```