Fix loop handling (closes #169)
divent / lint (push) Successful in 1m57s Details
divent / docker (push) Successful in 2m4s Details
divent / pypi (push) Has been skipped Details

This commit is contained in:
Michel Roux 2023-11-07 11:07:42 +01:00
parent 842896642e
commit 21737c33e4
1 changed files with 2 additions and 3 deletions

View File

@ -343,6 +343,5 @@ async def ical(entity_id: str):
def __main__():
quart_task = client.loop.create_task(app.run_task("0.0.0.0"))
quart_task.add_done_callback(lambda f: client.loop.stop())
client.run(DISCORD_TOKEN)
client.loop.create_task(client.start(DISCORD_TOKEN))
app.run("0.0.0.0", loop=client.loop)