Pre-release v1.0
This commit is contained in:
23
start-tg.py
Normal file
23
start-tg.py
Normal file
@@ -0,0 +1,23 @@
|
||||
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())
|
||||
Reference in New Issue
Block a user