send_reaction
Send emoji reactions to specific Telegram messages using message ID, enabling interactive bot responses and user engagement in channels.
Instructions
Send a reaction to a message
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| emoji | Yes | Emoji to send as reaction | |
| message_id | Yes | Message ID to react to |
Input Schema (JSON Schema)
{
"properties": {
"emoji": {
"description": "Emoji to send as reaction",
"type": "string"
},
"message_id": {
"description": "Message ID to react to",
"type": "number"
}
},
"required": [
"message_id",
"emoji"
],
"type": "object"
}
Implementation Reference
- src/index.ts:403-421 (handler)The handler for 'send_reaction' tool that calls TelegramBot.setMessageReaction to add the specified emoji reaction to the given message ID in the channel and returns a success message.case 'send_reaction': { const { message_id, emoji } = args as { message_id: number; emoji: string; }; await bot.setMessageReaction(CHANNEL_ID, message_id, { reaction: [{ type: 'emoji', emoji: emoji as any }], }); return { content: [ { type: 'text', text: `β Reaction sent successfully!\n\nπ± Channel: ${CHANNEL_ID}\nπ Message ID: ${message_id}\nπ Emoji: ${emoji}`, }, ], }; }
- src/index.ts:136-149 (schema)The input schema for the send_reaction tool defining the required message_id (number) and emoji (string) parameters with descriptions.inputSchema: { type: 'object', properties: { message_id: { type: 'number', description: 'ID of the message to react to', }, emoji: { type: 'string', description: 'Emoji to send as reaction (e.g., π, β€οΈ, π)', }, }, required: ['message_id', 'emoji'], },
- src/index.ts:133-151 (registration)The tool registration in the ListTools response, including name, description, and input schema for send_reaction.{ name: 'send_reaction', description: 'Send a reaction to a message', inputSchema: { type: 'object', properties: { message_id: { type: 'number', description: 'ID of the message to react to', }, emoji: { type: 'string', description: 'Emoji to send as reaction (e.g., π, β€οΈ, π)', }, }, required: ['message_id', 'emoji'], }, }, {