Skip to content

Feature Request: Persist data between responses in ConversationHandler #385

Description

@LiaungYip

Currently ConversationHandler doesn't save a user's responses.

Each response to the conversation triggers an update handler, which has access to the most recent update, but not the previous ones.

The ConversationHandler should be enhanced to support data persistence between states.

Use case

A conversation where the bot asks the user three questions, then saves the answers to all three questions to a database, in one database operation.

Implementation

This could be implemented by changing the existing ConversationHandler.conversations dict of key : state to a dict of key : {"state" : ___, "data" : ___}.

data is any object that the programmer wants, initially None.

data should be made available to all update handler callbacks.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Fields

Priority

None yet

Effort

None yet

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions