From 960fbb1c50f52e7a83fc77be4590979561e46490 Mon Sep 17 00:00:00 2001 From: Zevaryx Date: Sat, 30 Apr 2022 23:11:50 -0600 Subject: [PATCH] More detailed update response --- jarvis/cogs/botutil.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/jarvis/cogs/botutil.py b/jarvis/cogs/botutil.py index 4b0149b..38ddaf9 100644 --- a/jarvis/cogs/botutil.py +++ b/jarvis/cogs/botutil.py @@ -81,8 +81,10 @@ class BotutilCog(Scale): repo = git.Repo(".") current_hash = repo.head.object.hexsha origin = repo.remotes.origin + origin.fetch() + remote_hash = origin.refs[repo.active_branch.name].object.hexsha - if current_hash != origin.refs[repo.active_branch.name].object.hexsha: + if current_hash != remote_hash: current_commands = get_all_commands() _ = origin.pull() await asyncio.sleep(3) @@ -107,7 +109,7 @@ class BotutilCog(Scale): self.bot.reload_extension(module) elif any(new_args[x] != y for x, y in old_args): self.bot.reload_extension(module) - await ctx.reply("Updates applied!") + await ctx.reply(f"Updates applied! `{current_hash}` => `{remote_hash}`") else: await ctx.reply("No updates to apply")