How can a bot find out that a reaction emoji was left in a Telegram channel post? telebot python

19 Views Asked by At

I need the bot to understand that they left a reaction in the post and display in the console what type of reaction they gave, for example, heart, like, dislike, and I need this to work through the telebot library in python, please help, I don’t understand at all how this can be done.

I tried to read data from a message, something like "message.reaction", but I got an error saying that there is no "reaction".

import telebot

bot = telebot.TeleBot('token')


@bot.message_handler(func=lambda message: True)
    def handle_reaction(message):
        print(message.reaction)


bot.polling()

AttributeError: 'Message' object has no attribute 'reaction'. Did you mean: 'caption'?
0

There are 0 best solutions below