-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[QUESTION] Having multiple CallbackQueryHandlers inside a ConversationHandler #4249
Comments
What issue are you having, exactly? |
I have around 50 CallbackQueryHandlers, which I believe is slowing down the app. Whenever the user clicks on an InlineKeyboardButton, all those 50 callback handlers need to be checked, let's say. |
that is basically what |
I see, so is it possible to pass the callback_data of an inline button to the next state? if so, can you show me an example, please? |
You can save the data in e.g. |
Issue I am facing
Having multiple CallbackQueryHandlers inside a ConversationHandler
I need to implement a conversation flow where the user interacts with multiple sets of inline buttons (InlineKeyboardMarkup). Each set of inline buttons should have its own
CallbackQueryHandler
within theConversationHandler
.My goal is to be able to access the data from the previous
CallbackQueryHandler
(i.e., the inline button that the user clicked) in the currentCallbackQueryHandler
. This way, I can keep track of the user's choices throughout the conversation.For example, let's say the conversation flow looks like this:
Here's some sample code to illustrate what I'm trying to achieve:
The text was updated successfully, but these errors were encountered: