From c4f3eeb9386eb80e34eafacaf8185c469854c025 Mon Sep 17 00:00:00 2001 From: AkriliksKotya Date: Sun, 21 Dec 2025 17:38:40 +0500 Subject: [PATCH] fix --- c/update.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/c/update.py b/c/update.py index 65477c8..deb7e5a 100644 --- a/c/update.py +++ b/c/update.py @@ -17,21 +17,21 @@ class Update(commands.Cog): Make pull from git repository and restart """ - res = await self.bot.ch(server_id=context.guild.id) - channel = self.bot.get_channel(int(res)) + try: + res = await self.bot.ch(server_id=context.guild.id) + channel = self.bot.get_channel(int(res)) + except: + channel = context await channel.send('restarting...') try: subprocess.run(["git", "pull", "origin", "main"],capture_output=True) + await channel.send('restart successful') except: await channel.send('restart fail') return python = sys.executable os.execv(python, [python] + sys.argv) - try: - await channel.send('restart successful') - except: - print("rrrrr") @commands.Cog.listener() async def on_ready(self):