20 lines
391 B
Python
20 lines
391 B
Python
import asyncio
|
|
|
|
from aiogram import Bot, Dispatcher
|
|
|
|
import config
|
|
import handlers
|
|
import tasks
|
|
|
|
|
|
async def main() -> None:
|
|
bot = Bot(token=config.Config['api_token'])
|
|
|
|
dp = Dispatcher()
|
|
dp.include_router(handlers.router)
|
|
dp.startup.register(tasks.startup_task)
|
|
asyncio.create_task(tasks.daily_maintenance_task(bot))
|
|
await dp.start_polling(bot)
|
|
|
|
|
|
asyncio.run(main())
|