From b0775b880f53d0cf2a24094ec2adf44fc7d64a07 Mon Sep 17 00:00:00 2001 From: phixxy Date: Mon, 10 Jul 2023 18:04:46 -0700 Subject: [PATCH] Updated update command --- sparkytron3000.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sparkytron3000.py b/sparkytron3000.py index 425f123..e83c0c6 100644 --- a/sparkytron3000.py +++ b/sparkytron3000.py @@ -342,8 +342,12 @@ async def on_ready(): @bot.command() async def update(ctx): if ctx.author.id == 242018983241318410: - subprocess.run(["git","pull"]) - await ctx.send("Git pull success") + output = subprocess.run(["git","pull"],capture_output=True) + if output.stderr: + await ctx.send("Update Failed") + await ctx.send(output.stderr.decode('utf-8')) + else: + await ctx.send(output.stdout.decode('utf-8')) else: await ctx.send("You don't have permission to do this.")