From a388d07f30c122db0780d13c286255e66d3dfd46 Mon Sep 17 00:00:00 2001 From: palmtree5 <3577255+palmtree5@users.noreply.github.com> Date: Sun, 18 Feb 2018 17:59:46 -0900 Subject: [PATCH] [V3 Events] modify CommandInvokeError handler to use the vague message as a fallback if a cog doesn't provide its own __error function (#1279) --- redbot/core/events.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/redbot/core/events.py b/redbot/core/events.py index dda5b8125..6c49dbfbd 100644 --- a/redbot/core/events.py +++ b/redbot/core/events.py @@ -172,7 +172,8 @@ def init_events(bot, cli_flags): exception_log += "".join(traceback.format_exception(type(error), error, error.__traceback__)) bot._last_exception = exception_log - await ctx.send(inline(message)) + if not hasattr(ctx.cog, "_{0.command.cog_name}__error".format(ctx)): + await ctx.send(inline(message)) elif isinstance(error, commands.CommandNotFound): pass elif isinstance(error, commands.CheckFailure):