dht
This commit is contained in:
1 parent
c6c6276fe6
commit
698d0ca3f7
49 files changed
+1118
-53
No files matched your search
+6
-3
@@ -7,6 +7,9 @@ from app.bot.middleware import UserDataMiddleware
|
||||
from app.bot.routers.index import main_router
|
||||
|
||||
|
||||
dp = Dispatcher(storage=MemoryStorage())
|
||||
dp.update.outer_middleware(UserDataMiddleware())
|
||||
dp.include_router(main_router)
|
||||
def create_dispatcher() -> Dispatcher:
|
||||
"""Create aiogram Dispatcher lazily to avoid event loop issues at import time."""
|
||||
dp = Dispatcher(storage=MemoryStorage())
|
||||
dp.update.outer_middleware(UserDataMiddleware())
|
||||
dp.include_router(main_router)
|
||||
return dp
|
||||
Reference in new issue
Block a user