discord_remove_reaction
Remove a specific emoji reaction from a Discord message in a channel. Specify the channel, message, emoji, and optionally the user to manage reactions effectively.
Instructions
Remove a reaction from a message
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channelId | Yes | The Discord channel ID | |
| messageId | Yes | The message ID to remove reaction from | |
| emoji | Yes | Emoji to remove (Unicode or custom emoji format) | |
| userId | No | User ID to remove reaction from (defaults to self) |
Implementation Reference
- src/core/AutomationManager.ts:106-108 (handler)The core handler function for the discord_remove_reaction tool. It validates input parameters using RemoveReactionSchema and delegates the actual Discord API call to DiscordService.removeReaction.async removeReaction(channelId: string, messageId: string, emoji: string): Promise<string> { const parsed = schemas.RemoveReactionSchema.parse({ channelId, messageId, emoji }); return await this.discordService.removeReaction(parsed.channelId, parsed.messageId, parsed.emoji);
- src/types.ts:50-54 (schema)Zod schema defining the input parameters for the remove reaction tool: channelId, messageId, and emoji.export const RemoveReactionSchema = z.object({ channelId: z.string().describe("Discord channel ID"), messageId: z.string().describe("Discord message ID"), emoji: z.string().describe("Emoji (Unicode or string)") });
- src/core/DiscordController.ts:69-80 (registration)Dynamic registration/dispatch mechanism. Converts snake_case tool names (e.g., 'discord_remove_reaction' or 'remove_reaction') to camelCase method names on AutomationManager and invokes them. This is how the tool is 'registered' implicitly.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`); }