feat(*): first mvp
This commit is contained in:
@@ -11,11 +11,20 @@ setup_logging()
|
||||
async def runner() -> None:
|
||||
from . import handlers # noqa: PLC0415
|
||||
from .common import bot, dp # noqa: PLC0415
|
||||
from .sync import start_sync_listener # noqa: PLC0415
|
||||
|
||||
dp.include_routers(handlers.router)
|
||||
|
||||
sync_task = asyncio.create_task(start_sync_listener(bot))
|
||||
|
||||
await bot.delete_webhook(drop_pending_updates=True)
|
||||
await dp.start_polling(bot)
|
||||
|
||||
try:
|
||||
await dp.start_polling(bot)
|
||||
finally:
|
||||
sync_task.cancel()
|
||||
with contextlib.suppress(asyncio.CancelledError):
|
||||
await sync_task
|
||||
|
||||
|
||||
def plugins() -> None:
|
||||
|
||||
Reference in New Issue
Block a user