Improved updater

This commit is contained in:
ctih1 2025-07-26 22:31:50 +03:00
parent 2c3946b67d
commit 991264620a
2 changed files with 2 additions and 4 deletions

View file

@ -13,7 +13,7 @@ import psutil
import cpuinfo import cpuinfo
import sys import sys
import subprocess import subprocess
import updater
settings = settings_manager.settings settings = settings_manager.settings
@ -183,7 +183,7 @@ class BaseCommands(commands.Cog):
@commands.command() @commands.command()
async def force_update(self, ctx: commands.Context): async def force_update(self, ctx: commands.Context):
await ctx.send("Forcefully updating...") await ctx.send("Forcefully updating...")
subprocess.run([sys.executable, sys.executable, "updater.py"]) updater.force_update()
os.execv(sys.executable, [sys.executable] + sys.argv) os.execv(sys.executable, [sys.executable] + sys.argv)

View file

@ -14,5 +14,3 @@ def force_update() -> None:
pull = subprocess.run(["git", "pull", "origin", "main"], check=True, capture_output=True) pull = subprocess.run(["git", "pull", "origin", "main"], check=True, capture_output=True)
logger.info(pull) logger.info(pull)
force_update()