diff --git a/divent/bot.py b/divent/bot.py index 6728212..09c08bb 100644 --- a/divent/bot.py +++ b/divent/bot.py @@ -259,6 +259,7 @@ async def ical(guild_id: str): return calendar.serialize() -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) +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)