Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to access dialog_manager from middleware #453

Open
zax2002 opened this issue Dec 26, 2024 · 1 comment
Open

How to access dialog_manager from middleware #453

zax2002 opened this issue Dec 26, 2024 · 1 comment

Comments

@zax2002
Copy link
Contributor

zax2002 commented Dec 26, 2024

class MyMiddleware(BaseMiddleware):
    async def __call__(
        self,
        handler: Callable[[TelegramObject, dict[str, Any]], Awaitable[Any]],
        event: TelegramObject, 
        data: dict[str, Any],
    ):
        ...

How can I get dialog_manager, namely, I need the current dialog state in order to determine in middleware whether the state has changed after handler execution. The data doesn't have what I need

@zax2002 zax2002 changed the title How to access dialog_data from middleware How to access dialog_manager from middleware Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@zax2002 and others