Replies: 1 comment
-
Telegram Updates Events: https://core.telegram.org/bots/api#update You need to listen the "message_reaction" event. Example of use: const TelegramBot = require('node-telegram-bot-api');
const bot = new TelegramBot(TOKEN, {
polling: {
params: {
"allowed_updates": JSON.stringify(["update_id", "message", "edited_message", "channel_post", "edited_channel_post", "inline_query", "chosen_inline_result", "callback_query", "shipping_query", "pre_checkout_query", "poll", "poll_answer", "my_chat_member", "chat_member", "message_reaction"])
}
}
});
bot.on('message_reaction', (msg) => {
const chatId = msg.chat.id;
console.log(msg);
bot.sendMessage(chatId, 'Received your reaction message');
}); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I'm writing a bot connected to an AI Api. I would like to have an event like
bot.on("liked_message", (event:?) => {...}
.I'm reading the doc here https://github.com/yagop/node-telegram-bot-api/blob/master/doc/usage.md but can't find one that is doing it.
Does someone know which one is it?
Closest thing I could read from the documentation is https://core.telegram.org/bots/api#setmessagereaction
Kind regards,
Charles
Beta Was this translation helpful? Give feedback.
All reactions