From 199f4701927d613a779622e9acc42f33cb66bdba Mon Sep 17 00:00:00 2001 From: Profitroll <47523801+profitrollgame@users.noreply.github.com> Date: Sun, 11 Dec 2022 19:52:02 +0100 Subject: [PATCH] Reboot does not require kill anymore --- modules/commands/reboot.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/commands/reboot.py b/modules/commands/reboot.py index fa434dd..1397f41 100644 --- a/modules/commands/reboot.py +++ b/modules/commands/reboot.py @@ -1,7 +1,9 @@ from app import app, isAnAdmin from os import getpid +from sys import exit from pyrogram import filters -from modules.utils import configGet, logWrite, killProc, should_quote +from modules.utils import configGet, logWrite, should_quote +from modules.scheduled import scheduler pid = getpid() @@ -12,5 +14,6 @@ async def cmd_kill(app, msg): if msg.chat.id == configGet("admin_group") or await isAnAdmin(msg.from_user.id): logWrite(f"Shutting down bot with pid {pid}") await msg.reply_text(f"Вимкнення бота з підом `{pid}`", quote=should_quote(msg)) - killProc(pid) + scheduler.shutdown() + exit() # ============================================================================================================================== \ No newline at end of file