Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion bot/exts/filters/filtering.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,9 @@ async def _filter_message(self, msg: Message, delta: Optional[int] = None) -> No
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")
Comment thread
MarkKoz marked this conversation as resolved.
)
if autoban:
# Create a new context, with the author as is the bot, and the channel as #mod-alerts.
Expand Down