More detailed update response
This commit is contained in:
parent
e71df2ef10
commit
960fbb1c50
1 changed files with 4 additions and 2 deletions
|
@ -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")
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue