From 21737c33e409f1fd6d418d3730e20df7e0dcad7d Mon Sep 17 00:00:00 2001 From: Michel Roux Date: Tue, 7 Nov 2023 11:07:42 +0100 Subject: [PATCH] Fix loop handling (closes #169) --- divent/bot.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/divent/bot.py b/divent/bot.py index 91af96d..85baf9d 100644 --- a/divent/bot.py +++ b/divent/bot.py @@ -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)