From 756de23bcfc0576ab0d9f5389afcb8d5afddbb9b Mon Sep 17 00:00:00 2001 From: geekiot Date: Sun, 19 Oct 2025 18:01:25 +0500 Subject: [PATCH] Add [bot]: add dispatcher for polling the bot --- src/bot/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/bot/__init__.py b/src/bot/__init__.py index 103bccf..27793ce 100644 --- a/src/bot/__init__.py +++ b/src/bot/__init__.py @@ -1,6 +1,7 @@ __all__ = ["start_bot"] +from aiogram import Bot, Dispatcher from redis.asyncio.client import Redis from sqlalchemy.ext.asyncio import AsyncSession @@ -9,4 +10,8 @@ async def start_bot( bot_token: str, redis_client: Redis, database_session: AsyncSession, -) -> None: ... +) -> None: + bot = Bot(bot_token) + dp = Dispatcher() + + await dp.start_polling(bot)