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