diff options
Diffstat (limited to '')
-rw-r--r-- | cogs/admin.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cogs/admin.py b/cogs/admin.py index 67ffa4c..6c15e5e 100644 --- a/cogs/admin.py +++ b/cogs/admin.py @@ -32,7 +32,10 @@ class Admin(commands.Cog): @commands.check(is_mod) async def pull(self, ctx): g = git.cmd.Git(os.getcwd()) - await ctx.send(f"Probably pulled.\n```bash\n{g.pull()}```") + try: + await ctx.send(f"Probably pulled.\n```bash\n{g.pull()}```") + except git.exc.GitCommandError as e: + await ctx.send(f"An error has occured when pulling```bash\n{e}```") @commands.command(aliases=['addcommand', 'newcommand']) @commands.check(is_mod) |