update command changes
This commit is contained in:
@@ -21,14 +21,15 @@ class Update(commands.Cog):
|
|||||||
channel = self.bot.get_channel(int(res))
|
channel = self.bot.get_channel(int(res))
|
||||||
await channel.send('restarting...')
|
await channel.send('restarting...')
|
||||||
try:
|
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:
|
except:
|
||||||
await channel.send('restart fail')
|
await channel.send('restart fail')
|
||||||
return
|
return
|
||||||
|
|
||||||
python = sys.executable
|
python = sys.executable
|
||||||
os.execv(python, [python] + sys.argv)
|
os.execv(python, [python] + sys.argv)
|
||||||
|
await channel.send('restart successful')
|
||||||
|
|
||||||
@commands.Cog.listener()
|
@commands.Cog.listener()
|
||||||
async def on_ready(self):
|
async def on_ready(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user