mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Merge remote-tracking branch 'origin/dev-3.x' into dev-3.x
This commit is contained in:
commit
84bc0e347b
3 changed files with 21 additions and 0 deletions
|
|
@ -179,6 +179,12 @@ class Router:
|
|||
self._parent_router = router
|
||||
router.sub_routers.append(self)
|
||||
|
||||
def include_routers(self, *routers: Router) -> None:
|
||||
if not routers:
|
||||
raise ValueError("At least one router must be provided")
|
||||
for router in routers:
|
||||
self.include_router(router)
|
||||
|
||||
def include_router(self, router: Router) -> Router:
|
||||
"""
|
||||
Attach another router.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue