-
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
Exit from conversation when a new command is sent #1447
Comments
You have |
I don't understand, do you mean that |
Could you provide a full minimal working example? |
First, I apologize of my english:(
|
As far as I understand, However, I think to have found the problem: The Handlers are organized in groups (see docs of
would result in the following conversation:
To change this, behaviour, simply assign different groups:
For both group
If |
Thank you @Bibo-Joshi, that's what I was looking for. |
What I need:
Define two conversation handler, conv1 and conv2, with entry points /command1 and /command2: each conversation with multiple states. It should work in this way:
a. I enter in conv1 conversation, typing /command1, and I start to follow the normal conversation. Then, in the middle of conversation, I send /command2 and the first conversation end (Like ConversationHandler.END).
And viceversa:
b. I enter in conv2 conversation, typing /command2, and I start to follow the normal conversation. Then, in the middle of conversation, I send /command1 and the first conversation end (Like ConversationHandler.END).
I need that when I start a conversation with the bot I can interrupt it sending a command: in this case the bot end the conversation and answer the new command.
Expected behaviour:
There should be a way to define the conversation handler such that it will handle all the messages sent while the conversation is open.
Actual behaviour:
I've found #1365, so I've try to add to conversation handler the following fallbacks:
In this way it close conversation if there aren't ConversationHandler/CommandHandler that handle the command send before the ConversationHandler of /command.
Configuration:
Version of Python: 3.6.7
Version of python-telegram-bot: 11.1.0
The text was updated successfully, but these errors were encountered: