This commit is contained in:
2026-02-13 03:09:19 +05:00
commit 2204b615bc
13 changed files with 620 additions and 0 deletions

25
bot/main.py Normal file
View File

@@ -0,0 +1,25 @@
from aiogram import Bot, Dispatcher
import asyncio
import logging
from bot.config import config
from bot.handlers import router as main_router
async def main():
# Настройка логирования
logging.basicConfig(level=logging.INFO)
# Инициализация бота и диспетчера
bot = Bot(token=config.BOT_TOKEN)
dp = Dispatcher()
# Регистрация роутеров (хендлеров)
dp.include_router(main_router)
# Запуск polling
try:
await dp.start_polling(bot)
finally:
await bot.session.close()
if __name__ == "__main__":
asyncio.run(main())