You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I try to replicate the custom_states example with inline keyboards and I need to use callback handlers for this.
I tried with @bot.callback_query_handler(state=MyStates.name) and with @bot.callback_query_handler(func=lambda query: query.data, state=MyStates.name) but it didn't work.
Is there a way, that I am missing, to filter states with callback handlers? Maybe with register_callback_query_handler?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I try to replicate the custom_states example with inline keyboards and I need to use callback handlers for this.
I tried with
@bot.callback_query_handler(state=MyStates.name)
and with@bot.callback_query_handler(func=lambda query: query.data, state=MyStates.name)
but it didn't work.Is there a way, that I am missing, to filter states with callback handlers? Maybe with register_callback_query_handler?
Thanks for all the help.
Beta Was this translation helpful? Give feedback.
All reactions