mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Partially cover dispatcher
This commit is contained in:
parent
fa42dcdce2
commit
55496ab9ca
2 changed files with 61 additions and 2 deletions
|
|
@ -37,11 +37,11 @@ class Dispatcher(Router):
|
|||
update_id = update.update_id + 1
|
||||
|
||||
async def polling(self, bot: Bot):
|
||||
self.emit_startup(bot=bot)
|
||||
await self.emit_startup(bot=bot)
|
||||
try:
|
||||
async for update in self.listen_updates(bot):
|
||||
async for result in self.feed_update(bot, update):
|
||||
if isinstance(result, TelegramMethod):
|
||||
await result
|
||||
finally:
|
||||
self.emit_shutdown(bot=bot)
|
||||
await self.emit_shutdown(bot=bot)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue