1
0
mirror of https://github.com/civsocit/olgram.git synced 2025-12-15 14:26:16 +00:00

add server

This commit is contained in:
mihalin
2021-09-09 23:35:13 +03:00
parent fc9280881c
commit c1d29f4d8c
7 changed files with 117 additions and 13 deletions

View File

@@ -9,6 +9,8 @@ import olgram.commands.start # noqa: F401
import olgram.commands.menu # noqa: F401
import olgram.commands.bot_actions # noqa: F401
from server.server import main as server_main
async def init_database():
await Tortoise.init(config=TORTOISE_ORM)
@@ -22,6 +24,7 @@ def main():
loop.run_until_complete(init_database())
loop.create_task(dp.start_polling())
loop.create_task(server_main().start())
loop.run_forever()