23 строки
384 B
Python
23 строки
384 B
Python
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))
|