discord_delete_message
Delete Discord messages by specifying channel and message IDs to remove unwanted content or manage conversations.
Instructions
Delete a message
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channelId | Yes | The Discord channel ID | |
| messageId | Yes | The message ID to delete |
Implementation Reference
- src/core/AutomationManager.ts:66-69 (handler)The core handler function that executes the Discord message deletion logic. Validates parameters using DeleteMessageSchema and forwards to DiscordService.async deleteMessage(channelId: string, messageId: string): Promise<string> { const parsed = schemas.DeleteMessageSchema.parse({ channelId, messageId }); return await this.discordService.deleteMessage(parsed.channelId, parsed.messageId); }
- src/types.ts:34-37 (schema)Zod validation schema defining the required inputs (channelId and messageId) for the discord_delete_message tool.export const DeleteMessageSchema = z.object({ channelId: z.string().describe("Discord channel ID"), messageId: z.string().describe("Specific message ID") });
- src/core/DiscordController.ts:69-80 (registration)Dynamic registration/dispatch mechanism that maps tool names like 'discord_delete_message' to camelCase methods (e.g., 'deleteMessage') in AutomationManager.private async callAutomationMethod(action: string, params: any): Promise<string> { // Convert action name to method name (snake_case to camelCase) const methodName = action.replace(/_([a-z])/g, (g) => g[1].toUpperCase()); // Check if method exists if (typeof (this.automationManager as any)[methodName] === 'function') { // Call the method with params return await (this.automationManager as any)[methodName](...Object.values(params)); } throw new Error(`Method '${methodName}' not found in AutomationManager`); }