mirror of
https://github.com/civsocit/olgram.git
synced 2025-12-15 14:26:16 +00:00
add server
This commit is contained in:
3
main.py
3
main.py
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user