aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar F4zii <[email protected]>2020-02-19 23:48:25 +0200
committerGravatar F4zii <[email protected]>2020-02-19 23:48:25 +0200
commit72be687ccad32558f7bafeb81813b1272d5b472b (patch)
tree4e8ae38e9948e825da54b688c06e3a5081ee457a
parentRearrange, Function naming and Docstrings (diff)
Rearrange, NoneTypes handling
-rw-r--r--bot/cogs/error_handler.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/bot/cogs/error_handler.py b/bot/cogs/error_handler.py
index 56294e8f9..cf514e5c6 100644
--- a/bot/cogs/error_handler.py
+++ b/bot/cogs/error_handler.py
@@ -74,13 +74,13 @@ class ErrorHandler(Cog):
# Try to look for a tag with the command's name if the command isn't found.
if isinstance(e, CommandNotFound) and not hasattr(ctx, "invoked_from_error_handler"):
if not ctx.channel.id == Channels.verification:
- command_name = ctx.invoked_with
- tags_get_command = self.bot.get_command("tags get")
tags_cog = self.bot.get_cog("Tags")
- if not all(tags_cog, tags_get_command):
+ tags_get_command = self.bot.get_command("tags get")
+ if not tags_cog and not tags_get_command:
return
ctx.invoked_from_error_handler = True
+ command_name = ctx.invoked_with
log_msg = "Cancelling attempt to fall back to a tag due to failed checks."
try:
if not await tags_get_command.can_run(ctx):