Even better error printing

This commit is contained in:
Zeva Rose 2021-06-29 20:42:13 -06:00
parent e49c3c1a22
commit e500004148

View file

@ -302,7 +302,10 @@ class DevCog(commands.Cog):
@commands.Cog.listener()
async def on_command_error(self, ctx, error):
await ctx.send(f"```{traceback.format_exc()}```")
if isinstance(error, commands.errors.MissingPermissions):
await ctx.send("I'm afraid I can't let you do that.")
else:
await ctx.send(f"Error processing command:\n```{error}```")
def setup(bot):