Animated Message Reactions
React to incoming user messages with animated emojis (👍, 🔥, 🎉, ❤️, ⚡) using setMessageReaction.
The setMessageReaction Method
Telegram Bot API supports adding emoji reactions directly to user messages. This provides instant visual feedback before sending text replies.
setMessageReaction Helper
function react(string|int $chatId, int $messageId, string $emoji = '👍', bool $isBig = true): array {
return bot('setMessageReaction', [
'chat_id' => $chatId,
'message_id' => $messageId,
'reaction' => [
['type' => 'emoji', 'emoji' => $emoji]
],
'is_big' => $isBig
]);
}
// Usage Example on user message
if (!empty($msg['text'])) {
react($chatId, $msg['message_id'], '🔥', true);
}
Popular Supported Emojis
Standard Unicode emojis supported by Telegram reactions: 👍, 👎, ❤️, 🔥, 🎉, 🤩, 👏, 😁, 🤔, 🤯, 😱, 🤬, 💩, ⚡, 🍌, 🍓, 🍾.
Botlify Cloud Runtime
Credentials are auto-injected in
Credentials are auto-injected in
.env — always load them with getenv(): BOT_TOKEN, ADMIN_CHAT_ID, BOT_USERNAME. Main database: database.db (SQLite, WAL mode). Runtime errors: error.log. Quick test: send to $ADMIN_CHAT_ID. Full details: Runtime Reference.