Improved updater

This commit is contained in:
ctih1 2025-07-26 22:29:10 +03:00
parent d6c6605e2a
commit 2c3946b67d
2 changed files with 2 additions and 3 deletions

View file

@ -184,7 +184,8 @@ class BaseCommands(commands.Cog):
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"]) subprocess.run([sys.executable, sys.executable, "updater.py"])
exit() os.execv(sys.executable, [sys.executable] + sys.argv)
@requires_admin() @requires_admin()
@commands.command() @commands.command()

View file

@ -14,7 +14,5 @@ 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)
logger.info("Starting bot")
os.execv(sys.executable, [sys.executable, "bot.py"])
force_update() force_update()