Dispatcher.current_state is not awaitable.

This commit is contained in:
Alex Root Junior 2017-08-02 07:30:38 +03:00
parent 27090cb0fe
commit 2f1a57a5bc

View file

@ -668,7 +668,7 @@ class Dispatcher:
self.next_step_message_handlers.register(message, otherwise, once, include_cancel, filters_set) self.next_step_message_handlers.register(message, otherwise, once, include_cancel, filters_set)
return await self.next_step_message_handlers.wait(message) return await self.next_step_message_handlers.wait(message)
async def current_state(self, *, def current_state(self, *,
chat: typing.Union[str, int, None] = None, chat: typing.Union[str, int, None] = None,
user: typing.Union[str, int, None] = None) -> FSMContext: user: typing.Union[str, int, None] = None) -> FSMContext:
return FSMContext(storage=self.storage, chat=chat, user=user) return FSMContext(storage=self.storage, chat=chat, user=user)