I am writing conversations with python-telegram-bot and need a way to disable nested conversations. That is, if a user is in a conversation, then an entry command for another conversation should not activate another handler.
It seems that this is not enforceable in a ConversationHandler object. I.e. I try to catch a command in a state where I don't want another command to run (UPLOAD), but it doesn't work - a bot happily starts another conversation. Also, this does not work with fallbacks alone
submission_conv_handler = ConversationHandler(
entry_points=[
CommandHandler('submit', self.submit_command),
],
states={
self.CHOSE_TYPE: [
CallbackQueryHandler(self.submission_query_callback, pattern=r'^(py|ipynb)')
],
self.UPLOAD: [
MessageHandler(Filters.document, self.upload_message),
MessageHandler(Filters.command | Filters.text , done)
],
},
fallbacks=[MessageHandler(Filters.all, done)]
)