diff --git a/apps/web_app/telegram/bot.py b/apps/web_app/telegram/bot.py index 80d78646..70ddb7c4 100644 --- a/apps/web_app/telegram/bot.py +++ b/apps/web_app/telegram/bot.py @@ -3,7 +3,11 @@ from .config import TELEGRAM_TOKEN from .handlers import index_router -bot = Bot(token=TELEGRAM_TOKEN) -dp = Dispatcher() +if TELEGRAM_TOKEN: + bot = Bot(token=TELEGRAM_TOKEN) + dp = Dispatcher() -dp.include_router(index_router) + dp.include_router(index_router) +else: + bot = None + dp = None