Skip to main content
Glama

remove_reaction

Remove a bot's reaction from a Discord message by specifying channel, message ID, and emoji to manage message interactions.

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 remove_reaction tool logic. Fetches the Discord channel and message, removes the specified reaction added by the bot, and returns a confirmation 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}" )]
  • Input schema definition for the remove_reaction tool, specifying required parameters: channel_id, message_id, and emoji with their types and descriptions.
    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"] }
  • Registration and dispatch logic for core tools including remove_reaction. Checks if the tool name is in core_tool_names and dynamically calls the corresponding handler method on CoreToolHandlers.
    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)
  • Tool object creation for remove_reaction, defining name, description, and input schema for MCP registration.
    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"] } ),

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