Files
festival_bot/main.py
2026-01-27 03:09:18 +04:00

27 lines
469 B
Python

import asyncio
import os
from aiogram import Bot, Dispatcher
from dotenv import load_dotenv
from bot.handlers2 import handlers_router
load_dotenv()
async def start() -> None:
bot = Bot(token=os.getenv("BOT_TOKEN"))
dp = Dispatcher()
dp.include_routers(handlers_router)
try:
await bot.delete_webhook()
await dp.start_polling(bot)
finally:
await bot.session.close()
if __name__ == "__main__":
asyncio.run(start())