How to detect user's reaction such as "thumbs up", "like", "dislike" on the message of the channel

99 views Asked by At

The code below detects nothing when I click the "like" on the channel. I don't know what's wrong with my code.

# pyTelegramBotAPI   Version  4.14.1

import telebot
from telebot import apihelper
from telebot import types
from telebot import util
from telebot.types import ChatMemberUpdated
from telebot.util import update_types

......

@bot.callback_query_handler(func=lambda call: True)
def handle_callback_query(call):
    print(call)
    if call.data == "like":
        print("user likes!!!")
.....

# in main function:

bot.infinity_polling(allowed_updates=update_types)
1

There are 1 answers

0
DamAnD On

Currently Telegram Bots can't see reactions to messages, telegram just doesn't provide this data, you can try using inline or keyboard buttons.