chatgpt_bot/app.py

20 lines
441 B
Python

import asyncio
from aiogram import Dispatcher, Bot
from aiogram.client.default import DefaultBotProperties
from config import *
from bot.handlers.user.user_handlers import user
from db.db import *
dp = Dispatcher()
dp.include_router(user)
bot = Bot(token=bot_token, default=DefaultBotProperties(parse_mode='HTML'))
async def main():
await init_db()
await dp.start_polling(bot)
if __name__ == '__main__':
asyncio.run(main())