discord_add_multiple_reactions
Add multiple emoji reactions to a Discord message simultaneously using channel ID, message ID, and emoji array inputs.
Instructions
Adds multiple emoji reactions to a Discord message at once
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channelId | Yes | ||
| messageId | Yes | ||
| emojis | Yes |
Implementation Reference
- src/index.ts:1028-1073 (handler)Handler function that fetches the channel and message, then adds each emoji reaction sequentially with a delay to avoid rate limiting.case "discord_add_multiple_reactions": { const { channelId, messageId, emojis } = AddMultipleReactionsSchema.parse(args); try { if (!client.isReady()) { return { content: [{ type: "text", text: "Discord client not logged in. Please use discord_login tool first." }], isError: true }; } const channel = await 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 { content: [{ type: "text", text: `Failed to add reactions: ${error}` }], isError: true }; } }
- src/index.ts:97-100 (schema)Zod schema for input validation of channelId, messageId, and array of emojis.const AddMultipleReactionsSchema = z.object({ channelId: z.string(), messageId: z.string(), emojis: z.array(z.string())
- src/index.ts:344-358 (registration)Tool registration in the listTools response, defining name, description, and input 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"] }