discord_set_member_permission
Modify individual member permissions for a Discord channel by allowing or denying specific access rights to control user interactions.
Instructions
Allow or deny specific permissions for a single member on a channel.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channel_id | Yes | ||
| user_id | Yes | ||
| allow | No | ||
| deny | No | ||
| reason | No |
Implementation Reference
- src/tools/permissions.ts:118-125 (handler)The handler logic for "discord_set_member_permission" which updates channel permission overwrites for a specific member using discord.js.
case "discord_set_member_permission": { const channel = await getGuildChannel(args.channel_id as string); const options: PermissionOverwriteOptions = {}; parsePermArray(args.allow).forEach((p) => { (options as Record<string, boolean>)[p] = true; }); parsePermArray(args.deny).forEach((p) => { (options as Record<string, boolean>)[p] = false; }); await channel.permissionOverwrites.edit(args.user_id as string, options, { reason: args.reason as string | undefined }); return { content: [{ type: "text", text: `✅ Permissions updated for member ${args.user_id} on #${channel.name}.` }] }; } - src/tools/permissions.ts:32-45 (schema)The tool definition schema for "discord_set_member_permission".
name: "discord_set_member_permission", description: "Allow or deny specific permissions for a single member on a channel.", inputSchema: { type: "object", properties: { channel_id: { type: "string" }, user_id: { type: "string" }, allow: { type: "array", items: { type: "string" } }, deny: { type: "array", items: { type: "string" } }, reason: { type: "string" }, }, required: ["channel_id", "user_id"], }, },