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