aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar ks129 <[email protected]>2020-05-18 14:28:09 +0300
committerGravatar ks129 <[email protected]>2020-05-18 14:28:09 +0300
commit3ea33bc9e0c313ba62afddae7494a40690ef6e71 (patch)
treee6f2adc77073710d88bd53546635620ba2555ec1
parentEH 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.py2
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: