chatgpt_bot/app.py

20 lines
441 B
Python
Raw Normal View History

2024-10-05 14:35:26 +00:00
import asyncio
from aiogram import Dispatcher, Bot
from aiogram.client.default import DefaultBotProperties
from config import *
from bot.handlers.user.user_handlers import user
2024-10-09 20:50:46 +00:00
from db.db import *
2024-10-05 14:35:26 +00:00
dp = Dispatcher()
dp.include_router(user)
bot = Bot(token=bot_token, default=DefaultBotProperties(parse_mode='HTML'))
async def main():
2024-10-09 20:50:46 +00:00
await init_db()
2024-10-05 14:35:26 +00:00
await dp.start_polling(bot)
if __name__ == '__main__':
asyncio.run(main())