minor fixes

This commit is contained in:
artie 2024-03-01 21:04:41 +01:00
parent 7a66139810
commit 43ca4b886d
2 changed files with 4 additions and 3 deletions

View File

@ -8,4 +8,4 @@ dev:
source $(BIN)/activate; pnpx nodemon bot.py source $(BIN)/activate; pnpx nodemon bot.py
clean: clean:
rm -rf venv rm -rf venv

View File

@ -103,14 +103,15 @@ class Owner(commands.Cog, command_attrs={"hidden": True}):
await self.message.edit(view=None) await self.message.edit(view=None)
res = await utils.run_cmd("git pull") res = await utils.run_cmd("git pull")
output = res.decoded
embed = discord.Embed( embed = discord.Embed(
description=self.bot.codeblock(res.decoded, "cmd"), description=self.bot.codeblock(output, "cmd"),
timestamp=pendulum.now(), timestamp=pendulum.now(),
color=discord.Color.green() if res.ok else discord.Color.red(), color=discord.Color.green() if res.ok else discord.Color.red(),
) )
if res.ok: if res.ok and output != "Already up to date.":
view = RestartView(ctx) view = RestartView(ctx)
view.message = await ctx.reply(embed=embed, view=view) view.message = await ctx.reply(embed=embed, view=view)
return return