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

This commit is contained in:
Michel Roux 2023-11-07 11:07:42 +01:00
parent 842896642e
commit 21737c33e4

View File

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