diff options
| -rw-r--r-- | bot/cogs/error_handler.py | 5 | ||||
| -rw-r--r-- | bot/cogs/moderation.py | 1 | 
2 files changed, 3 insertions, 3 deletions
| diff --git a/bot/cogs/error_handler.py b/bot/cogs/error_handler.py index 1f0700f28..033a49d39 100644 --- a/bot/cogs/error_handler.py +++ b/bot/cogs/error_handler.py @@ -43,9 +43,8 @@ class ErrorHandler:          else:              help_command = (self.bot.get_command("help"),) -        cog_has_handler = command and hasattr(ctx.cog, f"_{command.cog_name}__error") -        if hasattr(command, "on_error") or cog_has_handler: -            log.debug(f"Command {command} has a local error handler; ignoring.") +        if hasattr(e, "handled"): +            log.trace(f"Command {command} had its error already handled locally; ignoring.")              return          # Try to look for a tag with the command's name if the command isn't found. diff --git a/bot/cogs/moderation.py b/bot/cogs/moderation.py index 63c0e4417..fb791c933 100644 --- a/bot/cogs/moderation.py +++ b/bot/cogs/moderation.py @@ -1378,6 +1378,7 @@ class Moderation(Scheduler):          if isinstance(error, BadUnionArgument):              if User in error.converters:                  await ctx.send(str(error.errors[0])) +                error.handled = True      async def respect_role_hierarchy(self, ctx: Context, target: UserTypes, infr_type: str) -> bool:          """ | 
