Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[FEATURE] Transition states for ConversationHandler #2388

@edenworky

Description

@edenworky

I want to have encapsulated (one file for each) nested conversation handlers, but there's no way to trigger callbacks in a parent conversation (despite being able to trigger a parent state withmap_to_parent. The nested conversation example only works because the different conversations are not encapsulated from each other, so a nested conversation can just directly call a callback the parent conversation uses.

I think it would be great to have transitional states. For an example menu, right now a conversation handler sets up the keyboard in the entry point, then goes to aMENU state to handle the updates, and a child conversation needs to call the parent's setup method and then transition to the parentMENU (viamap_to_parent). I want the parent's entry to not reply and instead go to a transitionSETUP_MENU, which as soon as it's entered sends the menu and transitions toMENU. This way, if I want to go back to the parent menu, I can simply transition from the child conversation to the parentSETUP_MENU and preserve encapsulation.

I considered that this could possibly be achieved with a state that somehow triggers an update for itself, but I don't know self-trigger like that. Either a special handler or tips for self-triggering would be greatly appreciated, and either way it could simplify the nested conversation example quite substantially imo

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp