Skip to content

Conversation

@sahilsharma811
Copy link

This is an example of a bot with an inline keyboard that can handle user's response with a dedicated callback query handler. The bot implements a Conversation Handlers to handle the response of the user, which is sent by the inline keyboard.

@python-telegram-bot python-telegram-bot deleted a comment from codecov bot Oct 20, 2017
Copy link
Member

@jsmnbom jsmnbom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few comments, I have yet to actually run the example to see how i runs, but it mostly looks good! :D

@sahilsharma811
Copy link
Author

@bomjacob. I've made all the changes as requested.

@vr2xiq
Copy link

vr2xiq commented Nov 1, 2017

is it possible to return different routes?
let's say 2 buttons inlinekeyboard
press 1 return third route
press 2 return forth route

@sahilsharma811
Copy link
Author

It might be possible, but I'm not sure yet.

@Eldinnie
Copy link
Member

Eldinnie commented Dec 5, 2017

It looks okay to me. But I have some questions/additions I would like to see.
First of all, the conversation is never ended. I would prefer if you return ConversationHandler.END at the end of second.

Secondly I do agree with @vr2xiq that it would be nice if the example would show a keyboard with a choice. So for example on start you have a choice of two buttons (1 and 2)
When selected 1 you will have a new choice of 3 and 4, and when selected 4 you will have a second choice of 4 and 2 (just an example)
This will have a more elaborate view on CallbackQqueryHandlers in a ConversationHandler and will have to use the pattern argument to discern between them.

You think it's possible for you to adjust the example that way?

@Eldinnie Eldinnie added the 📋 pending-reply work status: pending-reply label Dec 5, 2017
@sahilsharma811
Copy link
Author

@Eldinnie I have added the ConversationHandler.END at the end of second.
For the keyboard which provide two or more choices, I will work on that ASAP. Till then we can merge this example so other developers can use the example to build awesome bots. Thanks

@tsnoam
Copy link
Member

tsnoam commented May 7, 2018

@bomjacob @Eldinnie
I see there are commits following your review. Can you please check if we can merge it?

@python-telegram-bot python-telegram-bot deleted a comment from codecov bot May 8, 2018
@tsnoam tsnoam closed this in #1502 Sep 13, 2019
tsnoam pushed a commit that referenced this pull request Sep 13, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Aug 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

📋 pending-reply work status: pending-reply

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants