diff --git a/aiogram/client/context_controller.py b/aiogram/client/context_controller.py index 351a7caf..d2402018 100644 --- a/aiogram/client/context_controller.py +++ b/aiogram/client/context_controller.py @@ -16,7 +16,12 @@ class BotContextController(BaseModel): else: self._bot = __context.get("bot") - def as_(self, bot: "Bot") -> Self: - """Bind object to a bot instance.""" + def as_(self, bot: Optional["Bot"]) -> Self: + """ + Bind object to a bot instance. + + :param bot: Bot instance + :return: self + """ self._bot = bot return self