diff options
author | 2020-05-18 14:28:09 +0300 | |
---|---|---|
committer | 2020-05-18 14:28:09 +0300 | |
commit | 3ea33bc9e0c313ba62afddae7494a40690ef6e71 (patch) | |
tree | e6f2adc77073710d88bd53546635620ba2555ec1 | |
parent | EH Tests: Remove class member `cog` + other small changes (diff) |
Error Handler: Changed `CommandNotFound` error check for testing
Replaced `hasattr` with `getattr` for unit tests
-rw-r--r-- | bot/cogs/error_handler.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/cogs/error_handler.py b/bot/cogs/error_handler.py index 23d1eed82..65cf5e37b 100644 --- a/bot/cogs/error_handler.py +++ b/bot/cogs/error_handler.py @@ -50,7 +50,7 @@ class ErrorHandler(Cog): log.trace(f"Command {command} had its error already handled locally; ignoring.") return - if isinstance(e, errors.CommandNotFound) and not hasattr(ctx, "invoked_from_error_handler"): + if isinstance(e, errors.CommandNotFound) and not getattr(ctx, "invoked_from_error_handler", False): if await self.try_silence(ctx): return if ctx.channel.id != Channels.verification: |