Skip to main content
Glama

remove_reaction

Delete a Discord bot's reaction from a specific message by providing the channel ID, message ID, and emoji to remove unwanted or incorrect reactions.

Instructions

Remove the bot's reaction from a message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channel_idYes
message_idYes
emojiYes

Implementation Reference

  • The core handler function that implements the logic for the 'remove_reaction' tool. It fetches the Discord channel and message using the provided IDs, removes the specified emoji reaction added by the bot's user, and returns a confirmation TextContent message.
    @staticmethod async def handle_remove_reaction(discord_client, arguments: Dict[str, Any]) -> List[TextContent]: """Remove a reaction from a message""" channel = await discord_client.fetch_channel(int(arguments["channel_id"])) message = await channel.fetch_message(int(arguments["message_id"])) emoji = arguments["emoji"] await message.remove_reaction(emoji, discord_client.user) return [TextContent( type="text", text=f"Removed reaction {emoji} from message in #{channel.name}" )]
  • Registers the 'remove_reaction' tool in the MCP server by creating a Tool object with its name, description, and input schema defining the required parameters: channel_id, message_id, and emoji.
    Tool( name="remove_reaction", description="Remove a reaction from a message", inputSchema={ "type": "object", "properties": { "channel_id": { "type": "string", "description": "Channel containing the message" }, "message_id": { "type": "string", "description": "Message to remove reaction from" }, "emoji": { "type": "string", "description": "Emoji to remove (Unicode or custom emoji ID)" } }, "required": ["channel_id", "message_id", "emoji"] } ),
  • Defines the input validation schema for the 'remove_reaction' tool, specifying an object with string properties channel_id, message_id, emoji, all required.
    inputSchema={ "type": "object", "properties": { "channel_id": { "type": "string", "description": "Channel containing the message" }, "message_id": { "type": "string", "description": "Message to remove reaction from" }, "emoji": { "type": "string", "description": "Emoji to remove (Unicode or custom emoji ID)" } }, "required": ["channel_id", "message_id", "emoji"] }
  • Part of the call_tool function that registers 'remove_reaction' in the core_tool_names list and dynamically dispatches to CoreToolHandlers.handle_remove_reaction when called.
    core_tool_names = [ "get_server_info", "list_servers", "get_channels", "list_members", "get_user_info", "send_message", "read_messages", "add_reaction", "add_multiple_reactions", "remove_reaction", "moderate_message", "create_text_channel", "delete_channel", "add_role", "remove_role" ] if name in core_tool_names: handler_method = f"handle_{name}" if hasattr(CoreToolHandlers, handler_method): return await getattr(CoreToolHandlers, handler_method)(discord_client, arguments)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wowjinxy/mcp-discord'

If you have feedback or need assistance with the MCP directory API, please join our Discord server