Set member channel permission
discord_
Write
- Toolset
- Permissions
permissions - Discord permission
- Manage Roles
- Context cost
- 333 tokens, estimated1,330 bytes of definition, divided by 4
Add or update a per-channel permission overwrite for a single member, allowing and/or denying specific permissions. Merges with the member's existing overwrite. Requires the Manage Roles permission. Use discord_ to target a whole role instead.
Risk and annotations
Read-onlyreadOnlyHint | no | Can modify your server. |
|---|---|---|
DestructivedestructiveHint | no | Declared non-destructive. |
IdempotentidempotentHint | yes | Repeating the call with the same arguments has no additional effect. |
Open worldopenWorldHint | yes | Interacts with an external system: Discord. |
Annotations are hints the server declares. Clients use them to decide when to ask you before a call.
Parameters
| Parameter | Type | Rules | Description |
|---|---|---|---|
| channel_ | string | pattern ^\d{17,20}$ | ID (snowflake) of the channel to set the overwrite on. |
| user_ | string | pattern ^\d{17,20}$ | ID (snowflake) of the member to grant/deny permissions for. |
| allowoptional | array of strings or string | none | Permission flag names to allow, e.g. ['ViewChannel'] (or the same array JSON-encoded as a string). Uses Discord PermissionsBitField flag names. |
| denyoptional | array of strings or string | none | Permission flag names to deny (array, or JSON-encoded array string). |
| reasonoptional | string | none | Optional reason recorded in the server audit log. |
Output
This tool declares no output schema. Its description says what it returns; this page shows no example rather than invent one.
Related tools
Named in its description
Also in Permissions
Raw definition (1,330 bytes)
{
"name": "discord_set_member_permission",
"description": "Add or update a per-channel permission overwrite for a single member, allowing and/or denying specific permissions. Merges with the member's existing overwrite. Requires the Manage Roles permission. Use discord_set_role_permission to target a whole role instead.",
"inputSchema": {
"type": "object",
"properties": {
"channel_id": {
"type": "string",
"pattern": "^\\d{17,20}$",
"description": "ID (snowflake) of the channel to set the overwrite on."
},
"user_id": {
"type": "string",
"pattern": "^\\d{17,20}$",
"description": "ID (snowflake) of the member to grant/deny permissions for."
},
"allow": {
"description": "Permission flag names to allow, e.g. ['ViewChannel'] (or the same array JSON-encoded as a string). Uses Discord PermissionsBitField flag names.",
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "string"
}
]
},
"deny": {
"description": "Permission flag names to deny (array, or JSON-encoded array string).",
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "string"
}
]
},
"reason": {
"description": "Optional reason recorded in the server audit log.",
"type": "string"
}
},
"required": [
"channel_id",
"user_id"
],
"additionalProperties": false
},
"annotations": {
"title": "Set member channel permission",
"readOnlyHint": false,
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": true
}
}