All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
18 lines
356 B
Python
18 lines
356 B
Python
from typing import Optional
|
|
|
|
from aiogram import Bot, Router
|
|
|
|
|
|
class Handler:
|
|
bot: Optional[Bot]
|
|
router: Router
|
|
|
|
def __init__(self, bot: Optional[Bot] = None) -> None:
|
|
if bot:
|
|
assert isinstance(bot, Bot)
|
|
self.bot = bot
|
|
self.router = Router()
|
|
|
|
def __call__(self) -> Router:
|
|
return self.router
|