discord_delete_message
Delete specific messages from Discord channels using channel and message IDs. Remove unwanted content or correct errors in your server.
Instructions
Delete a specific message from a channel.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channel_id | Yes | ||
| message_id | Yes | ||
| reason | No |
Implementation Reference
- src/tools/messages.ts:393-398 (handler)The handler implementation for discord_delete_message that fetches the channel, retrieves the message, and deletes it.
case "discord_delete_message": { const channel = await getTextChannel(args.channel_id as string); const msg = await channel.messages.fetch(args.message_id as string); await msg.delete(); return { content: [{ type: "text", text: `✅ Message ${args.message_id} deleted.` }] }; } - src/tools/messages.ts:228-240 (schema)The MCP schema definition for discord_delete_message, specifying input requirements.
{ name: "discord_delete_message", description: "Delete a specific message from a channel.", inputSchema: { type: "object", properties: { channel_id: { type: "string" }, message_id: { type: "string" }, reason: { type: "string" }, }, required: ["channel_id", "message_id"], }, },