Even better error printing
This commit is contained in:
parent
e49c3c1a22
commit
e500004148
1 changed files with 4 additions and 1 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Reference in a new issue