diff options
-rw-r--r-- | bot/exts/filters/filtering.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bot/exts/filters/filtering.py b/bot/exts/filters/filtering.py index 1289dfe41..13035c0c8 100644 --- a/bot/exts/filters/filtering.py +++ b/bot/exts/filters/filtering.py @@ -393,7 +393,9 @@ class Filtering(Cog): autoban = reason and "[autoban]" in reason.lower() if not autoban and filter_name == "filter_invites" and isinstance(result, dict): autoban = any( - "[autoban]" in invite_info.get("reason", "").lower() for invite_info in result.values() + "[autoban]" in invite_info["reason"].lower() + for invite_info in result.values() + if invite_info.get("reason") ) if autoban: # Create a new context, with the author as is the bot, and the channel as #mod-alerts. |