From 5b4f1f794f9fb449fcdabb9795239607a1fe9b40 Mon Sep 17 00:00:00 2001 From: thedragonsinn <98635854+thedragonsinn@users.noreply.github.com> Date: Thu, 26 Sep 2024 15:18:20 +0530 Subject: [PATCH] refactor `ext updater`: adjust according to core. --- app/plugins/misc/extra_module_updater.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/plugins/misc/extra_module_updater.py b/app/plugins/misc/extra_module_updater.py index aefe276..6fe49c8 100644 --- a/app/plugins/misc/extra_module_updater.py +++ b/app/plugins/misc/extra_module_updater.py @@ -1,14 +1,13 @@ -from ub_core.default_plugins.restart import restart from ub_core.utils import run_shell_cmd from app import BOT, Message, bot -@bot.add_cmd(cmd="supdate", allow_sudo=False) -async def social_dl_update(bot: BOT, message: Message): +@bot.add_cmd(cmd="extupdate", allow_sudo=False) +async def extra_modules_updater(bot: BOT, message: Message): output = await run_shell_cmd( cmd="cd app/modules && git pull", timeout=10, ret_val="0" ) - update_notif = await message.reply(output) + await message.reply(output) if output.strip() != "Already up to date.": - await restart(bot, message, update_notif) + bot.raise_sigint()