From 203c6bc6af7ed535630c6a7237bcd87ac8a2cbe0 Mon Sep 17 00:00:00 2001 From: Michel Roux Date: Mon, 22 Aug 2022 21:44:02 +0000 Subject: [PATCH] Fix main --- Dockerfile | 2 +- divent/__main__.py | 3 --- divent/bot.py | 7 +++---- 3 files changed, 4 insertions(+), 8 deletions(-) delete mode 100644 divent/__main__.py diff --git a/Dockerfile b/Dockerfile index 7deed9a..ffc6d91 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,4 +9,4 @@ FROM python:3.10.6-slim COPY --from=build /app/dist /tmp/dist RUN pip install /tmp/dist/*.whl && rm -rf /tmp/dist -CMD ["python", "-m", "divent"] +CMD ["python", "-m", "divent.bot"] diff --git a/divent/__main__.py b/divent/__main__.py deleted file mode 100644 index e3d046d..0000000 --- a/divent/__main__.py +++ /dev/null @@ -1,3 +0,0 @@ -from .bot import run # type: ignore - -run() diff --git a/divent/bot.py b/divent/bot.py index a203eec..5805f78 100644 --- a/divent/bot.py +++ b/divent/bot.py @@ -215,7 +215,6 @@ async def ical(guild_id: str): return str(calendar) -def run(): - quart_task = client.loop.create_task(app.run_task()) - quart_task.add_done_callback(lambda f: client.loop.stop()) - client.run(DISCORD_TOKEN) +quart_task = client.loop.create_task(app.run_task()) +quart_task.add_done_callback(lambda f: client.loop.stop()) +client.run(DISCORD_TOKEN)