Files
opencaser/start-tg.py
2026-01-23 00:34:28 +09:00

23 lines
486 B
Python

import asyncio
from aiogram import Router, F
from aiogram import Bot, Dispatcher
import configparser
import os
from asyncpg_lite import DatabaseManager
import handlers
token = configparser.ConfigParser()
token.read('temp/token.ini', encoding='utf-8-sig')
bot = Bot(token=token.get("Main", "token"))
handlers.init(bot)
async def main():
dp = Dispatcher()
dp.include_routers(handlers.router)
await dp.start_polling(bot)
if __name__ == "__main__":
asyncio.run(main())