Skip to content

Multiple ConversationHandler as multiple conversation entry point ? is it possible #1185

@alisherafat01

Description

@alisherafat01

Is it possible to have two conversation handler with same entry points?

edit_photo_conversation = ConversationHandler(
    `entry_points=[CallbackQueryHandler(on_callback_data_received)],`
    states={
        EDIT_PHOTO: [MessageHandler(Filters.all, edit_photo)]
    },
    fallbacks=[CommandHandler('cancel', cancel)]
)
edit_gender_conversation = ConversationHandler(
    entry_points=[CallbackQueryHandler(on_callback_data_received)],
    states={
        EDIT_GENDER: [MessageHandler(Filters.all, edit_gender)]
    },
    fallbacks=[CommandHandler('cancel', cancel)]
)

dispatcher.add_handler(edit_photo_conversation)
dispatcher.add_handler(edit_gender_conversation)

callback_data of inline buttons to trigger each conversation is different but always dispatcher triggers the first handler.

So how to handle different conversations based on callback_data?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Priority

    None yet

    Effort

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions