pyTelegramBotAPI: set_message_reaction() – How do I make my Telegram bot react with a specific emoji to any message it recieves?

  Kiến thức lập trình

This is my code:

import telebot

bot = telebot.TeleBot(BOT_TOKEN)

@bot.message_handler(func=lambda message:True)
def thumbs_up(message):
    bot.set_message_reaction(,, '????')

if __name__ == '__main__':

And this is the error I get:

payload['reaction'] = json.dumps([r.to_dict() for r in reaction])

AttributeError: ‘str’ object has no attribute ‘to_dict’

I don’t understand how I can use a JSON list like the docs say:

It also says in the docs that the reaction parameter is optional but I get an error if I don’t include it.

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website