Description
What kind of feature are you missing? Where do you notice a shortcoming of PTB?
Currently, the CallbackQueryHandler in the library only checks the .data attribute when handling callback queries (ref). This presents a limitation as it doesn't support regex filtering handling clicks on buttons associated with CallbackGame. When a user clicks on a CallbackGame button, the .data attribute is None, causing the CallbackQueryHandler's regex pattern match to fail if it is set.
Describe the solution you'd like
I think changing this line to
callback_data = update.callback_query.data or update.callback_query.game_short_name
would solve this limitation.
Describe alternatives you've considered
Currently I manage to overcome this by handling all callbacks in one handler without pattern match and then using if else with .game_short_name
attribute
Additional context
No response
Metadata
Metadata
Assignees
Labels
No labels