4

The following code using python-telegram-bot (for the bot added as admin in some group) captures all kind of messages - posting messages, replies, edits. But when somebody puts like (or other emojis) on existing message, a handler function is not invoked.

from telegram import Update
from telegram.ext import Updater, MessageHandler, Filters, CallbackContext

updater = Updater(token='TOKEN', use_context=True)
dispatcher = updater.dispatcher

def handler(update: Update, context: CallbackContext):
    print("here")

echo_handler = MessageHandler(Filters.all, handler)
dispatcher.add_handler(echo_handler)
updater.start_polling()

Is it possible in python-telegram-bot to get update in a handler function when somebody puts a "reaction" (like/dislike/other emojis) on message?

augur
  • 354
  • 2
  • 7
  • 2
    It could be that this functionality is not exposed in Bot API. For inst. a comment in python-telegram-bot GitHub issue: https://github.com/python-telegram-bot/python-telegram-bot/issues/2879, also looking at Bot API documentation I don't see a mention of "reactions". But may be I'm missing something. – augur Mar 15 '22 at 05:41

0 Answers0