From 28b5449f2ac7ffe45e6d7fcda090c573def280ee Mon Sep 17 00:00:00 2001 From: profitroll Date: Fri, 30 Jun 2023 11:34:15 +0200 Subject: [PATCH] Improved /shutdown --- plugins/commands/general.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/commands/general.py b/plugins/commands/general.py index 18a0357..a33182a 100644 --- a/plugins/commands/general.py +++ b/plugins/commands/general.py @@ -1,3 +1,4 @@ +import asyncio from os import makedirs from pathlib import Path from time import time @@ -44,4 +45,4 @@ async def cmd_kill(app: PyroClient, msg: Message): Path(f"{app.config['locations']['cache']}/shutdown_time"), ) - exit() + asyncio.get_event_loop().create_task(app.stop())