You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to get reactions to my messages and use the following code:
constTelegramBot=require('node-telegram-bot-api');constTOKEN='***';constbot=newTelegramBot(TOKEN,{polling: {params: {allowed_updates: ["message","message_reaction"],}}});console.log(TelegramBot.messageTypes)bot.on('message',(msg)=>{bot.sendMessage(msg.chat.id,'Try reacting to this message!');});bot.on('message_reaction',(reaction)=>{console.log('Reaction received (message_reaction):',reaction);});bot.on("message_reaction_count",async(reaction)=>{console.log("message_reaction_count",reaction);});console.log('Bot started with polling enabled');
But when i send the bot a message and react to it I don't get a update. Do you have a idea what the problem could be?
Console output
✗ DEBUG=* bun run ./test.js node-telegram-bot-api polling with options: {"allowed_updates":["message","message_reaction"],"offset":0,"timeout":10} +0ms node-telegram-bot-api HTTP request: {"form":{"allowed_updates":["message","message_reaction"],"offset":0,"timeout":10},"method":"POST","url":"https://api.telegram.org/bot***/getUpdates","simple":false,"resolveWithFullResponse":true,"forever":true} +0ms[ "text", "animation", "audio", "channel_chat_created", "contact", "delete_chat_photo", "dice", "document", "game", "group_chat_created", "invoice", "left_chat_member", "location", "migrate_from_chat_id", "migrate_to_chat_id", "new_chat_members", "new_chat_photo", "new_chat_title", "passport_data", "photo", "pinned_message", "poll", "sticker", "successful_payment", "supergroup_chat_created", "video", "video_note", "voice", "video_chat_started", "video_chat_ended", "video_chat_participants_invited", "video_chat_scheduled", "message_auto_delete_timer_changed", "chat_invite_link", "chat_member_updated", "web_app_data", "message_reaction"]Bot started with polling enabled node-telegram-bot-api polling data [{"update_id":828783828,"message":{"message_id":985,"from":{"id":330034405,"is_bot":false,"first_name":"***","username":"***","language_code":"en"},"chat":{"id":330034405,"first_name":"***","username":"***","type":"private"},"date":1746611751,"text":"wer"}}] +5s node-telegram-bot-api updated offset: 828783829 +1ms node-telegram-bot-api Process Update {"update_id":828783828,"message":{"message_id":985,"from":{"id":330034405,"is_bot":false,"first_name":"***","username":"***","language_code":"en"},"chat":{"id":330034405,"first_name":"***","username":"***","type":"private"},"date":1746611751,"text":"wer"}} +5s node-telegram-bot-api Process Update message {"message_id":985,"from":{"id":330034405,"is_bot":false,"first_name":"***","username":"***","language_code":"en"},"chat":{"id":330034405,"first_name":"***","username":"***","type":"private"},"date":1746611751,"text":"wer"} +0ms node-telegram-bot-api HTTP request: {"form":{"chat_id":330034405,"text":"Try reacting to this message!"},"method":"POST","url":"https://api.telegram.org/bot***/sendMessage","simple":false,"resolveWithFullResponse":true,"forever":true} +1ms node-telegram-bot-api Emitting text: {"message_id":985,"from":{"id":330034405,"is_bot":false,"first_name":"***","username":"***","language_code":"en"},"chat":{"id":330034405,"first_name":"***","username":"***","type":"private"},"date":1746611751,"text":"wer"} +0ms node-telegram-bot-api Text message +0ms node-telegram-bot-api setTimeout for 300 miliseconds +1ms node-telegram-bot-api polling with options: {"allowed_updates":["message","message_reaction"],"offset":828783829,"timeout":10} +305ms node-telegram-bot-api HTTP request: {"form":{"allowed_updates":["message","message_reaction"],"offset":828783829,"timeout":10},"method":"POST","url":"https://api.telegram.org/bot***/getUpdates","simple":false,"resolveWithFullResponse":true,"forever":true} +305ms node-telegram-bot-api polling data [] +10s node-telegram-bot-api setTimeout for 300 miliseconds +1ms node-telegram-bot-api polling with options: {"allowed_updates":["message","message_reaction"],"offset":828783829,"timeout":10} +305ms node-telegram-bot-api HTTP request: {"form":{"allowed_updates":["message","message_reaction"],"offset":828783829,"timeout":10},"method":"POST","url":"https://api.telegram.org/bot***/getUpdates","simple":false,"resolveWithFullResponse":true,"forever":true} +10s
The text was updated successfully, but these errors were encountered:
I want to get reactions to my messages and use the following code:
But when i send the bot a message and react to it I don't get a update. Do you have a idea what the problem could be?
Console output
The text was updated successfully, but these errors were encountered: