Skip to content

set_update_listener for MessageReactionUpdated not works #2444

@Pankovea

Description

@Pankovea
  1. pyTelegramBotAPI 4.25.0
  2. Ubuntu 24.04.1 LTS
  3. Python 3.12.3

I use the message listener as in the example:

def handle_messages(messages):
	for message in messages:
		# Do something with the message

bot.set_update_listener(handle_messages)
bot.infinity_polling(allowed_updates=['message', 'message_reaction'])

Judging by the name, it should handle all\updates. But I don't get any reaction updates.
Handlers are triggered in this case:
@bot.message_reaction_handler(func=lambda m: "👻" in [r.emoji for r in m.new_reaction])
Or maybe there is a special listner?

For now, I'll use the following trick:

@bot.message_reaction_handler(
    func=lambda m: do_something(m) and False)
async def dummy(m: MessageReactionUpdated): pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions