set_channel_permissions(Args{
channel_id: trigger.channel_id,
target_type: "User",
target_id: "...",
operation_mode: "Replace Existing Overrides",
})
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.
Inputs
ID of the channel to set permissions for.
Whether the permission overwrite applies to a user or a role.
ID of the user or role to set permissions for. You can type @everyone as a shortcut to the @everyone role ID.
Required when using @everyone as the target.
Permissions to explicitly allow.
Permissions to explicitly deny.
"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.
Use this block in our visual flow editor. Bots are hosted 24/7 for free on inventor.bot.
Advanced Documentation
This documentation can be useful when using code mode. View as Markdown
set_channel_permissionsInputs
| Field | InventScript name | Value |
|---|---|---|
| Channel ID | channel_id | |
| Target Type | target_type | "User", "Role" |
| User or Role ID | target_id | |
| Server ID | server_id | |
| Allow Permissions | allow_permissions | "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 | deny_permissions | "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 | operation_mode | "Replace Existing Overrides", "Update Existing Overrides" |