update command changes

This commit is contained in:
2025-11-27 18:14:23 +05:00
parent 0c1fb35543
commit 433adac5f8

View File

@@ -21,14 +21,15 @@ class Update(commands.Cog):
channel = self.bot.get_channel(int(res))
await channel.send('restarting...')
try:
subprocess.run(["git", "pull", "--rebase", "origin", "main"],capture_output=True)
subprocess.run([],capture_output=True)
subprocess.run(["git", "pull", "origin", "main"],capture_output=True)
except:
await channel.send('restart fail')
return
python = sys.executable
os.execv(python, [python] + sys.argv)
await channel.send('restart successful')
@commands.Cog.listener()
async def on_ready(self):