Skip to main content
Glama

discord_add_multiple_reactions

Enable adding multiple emoji reactions to a Discord message in one step by specifying the channel ID, message ID, and desired emojis through the MCP-Discord server.

Instructions

Adds multiple emoji reactions to a Discord message at once

Input Schema

NameRequiredDescriptionDefault
channelIdYes
emojisYes
messageIdYes

Input Schema (JSON Schema)

{ "properties": { "channelId": { "type": "string" }, "emojis": { "items": { "type": "string" }, "type": "array" }, "messageId": { "type": "string" } }, "required": [ "channelId", "messageId", "emojis" ], "type": "object" }

Implementation Reference

  • The addMultipleReactionsHandler function that executes the tool: fetches channel and message, then sequentially adds each emoji reaction with a delay to avoid rate limits.
    export async function addMultipleReactionsHandler( args: unknown, context: ToolContext ): Promise<ToolResponse> { const { channelId, messageId, emojis } = AddMultipleReactionsSchema.parse(args); try { if (!context.client.isReady()) { return { content: [{ type: "text", text: "Discord client not logged in." }], isError: true }; } const channel = await context.client.channels.fetch(channelId); if (!channel || !channel.isTextBased() || !('messages' in channel)) { return { content: [{ type: "text", text: `Cannot find text channel with ID: ${channelId}` }], isError: true }; } const message = await channel.messages.fetch(messageId); if (!message) { return { content: [{ type: "text", text: `Cannot find message with ID: ${messageId}` }], isError: true }; } // Add each reaction sequentially for (const emoji of emojis) { await message.react(emoji); // Small delay to prevent rate limiting await new Promise(resolve => setTimeout(resolve, 300)); } return { content: [{ type: "text", text: `Successfully added ${emojis.length} reactions to message ID: ${messageId}` }] }; } catch (error) { return handleDiscordError(error); } }
  • MCP tool definition including name, description, and input schema (JSON Schema).
    { name: "discord_add_multiple_reactions", description: "Adds multiple emoji reactions to a Discord message at once", inputSchema: { type: "object", properties: { channelId: { type: "string" }, messageId: { type: "string" }, emojis: { type: "array", items: { type: "string" } } }, required: ["channelId", "messageId", "emojis"] } },
  • src/server.ts:148-151 (registration)
    Switch case in server that registers and dispatches tool calls to the addMultipleReactionsHandler.
    case "discord_add_multiple_reactions": this.logClientState("before discord_add_multiple_reactions handler"); toolResponse = await addMultipleReactionsHandler(args, this.toolContext); return toolResponse;

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/barryyip0625/mcp-discord'

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