mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
[V3 Events] modify CommandInvokeError handler to use the vague message as a fallback if a cog doesn't provide its own __error function (#1279)
This commit is contained in:
parent
7f0cca1baf
commit
a388d07f30
@ -172,6 +172,7 @@ def init_events(bot, cli_flags):
|
||||
exception_log += "".join(traceback.format_exception(type(error),
|
||||
error, error.__traceback__))
|
||||
bot._last_exception = exception_log
|
||||
if not hasattr(ctx.cog, "_{0.command.cog_name}__error".format(ctx)):
|
||||
await ctx.send(inline(message))
|
||||
elif isinstance(error, commands.CommandNotFound):
|
||||
pass
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user