diff --git a/assets/cogs/internal/base_commands.py b/assets/cogs/internal/base_commands.py index 711f9b0..f1625cf 100644 --- a/assets/cogs/internal/base_commands.py +++ b/assets/cogs/internal/base_commands.py @@ -13,7 +13,7 @@ import psutil import cpuinfo import sys import subprocess - +import updater settings = settings_manager.settings @@ -183,7 +183,7 @@ class BaseCommands(commands.Cog): @commands.command() async def force_update(self, ctx: commands.Context): await ctx.send("Forcefully updating...") - subprocess.run([sys.executable, sys.executable, "updater.py"]) + updater.force_update() os.execv(sys.executable, [sys.executable] + sys.argv) diff --git a/updater.py b/updater.py index c55f65b..f500939 100644 --- a/updater.py +++ b/updater.py @@ -14,5 +14,3 @@ def force_update() -> None: pull = subprocess.run(["git", "pull", "origin", "main"], check=True, capture_output=True) logger.info(pull) - -force_update() \ No newline at end of file