discord_delete_channel
Remove a Discord channel by specifying its ID, with optional reason for audit logs.
Instructions
Delete a channel.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channel_id | Yes | ||
| reason | No |
Implementation Reference
- src/tools/channels.ts:94-100 (handler)The handler logic for the 'discord_delete_channel' tool, which fetches the Discord channel and deletes it.
case "discord_delete_channel": { const channel = await discord.channels.fetch(args.channel_id as string); if (!channel) throw new Error("Channel not found."); const channelName = "name" in channel ? channel.name : channel.id; await channel.delete(args.reason as string | undefined); return { content: [{ type: "text", text: `✅ Channel #${channelName} deleted.` }] }; } - src/tools/channels.ts:22-33 (schema)The tool definition and input schema for 'discord_delete_channel'.
{ name: "discord_delete_channel", description: "Delete a channel.", inputSchema: { type: "object", properties: { channel_id: { type: "string" }, reason: { type: "string" }, }, required: ["channel_id"], }, },