Change command error messages to be hidden (if available)

This commit is contained in:
Zeva Rose 2021-07-19 13:29:56 -06:00
parent dd88f7fbee
commit 5f3e61f4f2

View file

@ -21,11 +21,13 @@ class ErrorHandlerCog(commands.Cog):
if isinstance(error, commands.errors.MissingPermissions) or isinstance( if isinstance(error, commands.errors.MissingPermissions) or isinstance(
error, commands.errors.CheckFailure error, commands.errors.CheckFailure
): ):
await ctx.send("I'm afraid I can't let you do that.") await ctx.send("I'm afraid I can't let you do that.", hidden=True)
elif isinstance(error, commands.errors.CommandNotFound): elif isinstance(error, commands.errors.CommandNotFound):
return return
else: else:
await ctx.send(f"Error processing command:\n```{error}```") await ctx.send(
f"Error processing command:\n```{error}```", hidden=True
)
def setup(bot): def setup(bot):