import asyncio import uvicorn from bot import bot, dp import config from web import app from server import Server if __name__ == '__main__': config = uvicorn.Config( app=app, host=config.Main.host, port=config.Main.port, ) server = Server( config=config, ) with server.run_in_thread(): asyncio.run(dp.run_polling(bot))