TGTGInsighttelegram intelligenceLIVE / telegram public index
← djangoproject
djangoproject avatar

TGINSIGHT POST

Post #84

@djangoproject

djangoproject

Views55Post view count
PostedJul 807/08/2016, 10:32 AM
Post content

Post content

https://github.com/python-telegram-bot/python-telegram-bot/pull/331 To hold a conversation with users, the #bot has to implement a #state machine to keep track of the different paths in the #conversation. This is a pretty common pattern and we don't have a good way to deal with it right now. The #state_machine_bot.py example is far from perfect. This PR introduces a new Handler subclass called ConversationHandler to take care of this. Instead of re-inventing the wheel, this handler acts only as "management" for the existing handler classes. Copied from documentation: A handler to hold a conversation with a user by managing four collections of other handlers. The first collection, a list named entry_points, is used to initiate the conversation, for example with a CommandHandler or RegexHandler.