fix
This commit is contained in:
10
c/update.py
10
c/update.py
@@ -17,12 +17,12 @@ class Update(commands.Cog):
|
||||
Make pull from git repository and restart
|
||||
|
||||
"""
|
||||
try:
|
||||
res = await self.bot.ch(server_id=context.guild.id)
|
||||
channel = self.bot.get_channel(res)
|
||||
channel = int(channel)
|
||||
except:
|
||||
res = await self.bot.ch(server_id=context.guild.id)
|
||||
channel = self.bot.get_channel(res)
|
||||
if channel == "None":
|
||||
channel = context
|
||||
else:
|
||||
channel = int(channel)
|
||||
await channel.send('restarting...')
|
||||
try:
|
||||
subprocess.run(["git", "pull", "origin", "main"],capture_output=True)
|
||||
|
||||
Reference in New Issue
Block a user