aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar ks129 <[email protected]>2020-06-11 07:51:34 +0300
committerGravatar GitHub <[email protected]>2020-06-11 07:51:34 +0300
commit5407e7832f668d23c2539743eceea487cf40b99c (patch)
tree32421f573d2f9cd4c3c0c47763fd8ac8aac0bf2f
parentRemove redis namespace collision test (diff)
Filtering: Fix some comments
Co-authored-by: Joseph Banks <[email protected]>
-rw-r--r--bot/cogs/filtering.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/cogs/filtering.py b/bot/cogs/filtering.py
index caf204561..45e712626 100644
--- a/bot/cogs/filtering.py
+++ b/bot/cogs/filtering.py
@@ -57,7 +57,7 @@ def expand_spoilers(text: str) -> str:
class Filtering(Cog):
"""Filtering out invites, blacklisting domains, and warning us of certain regular expressions."""
- # Redis cache for last bad words in nickname alert sent per user.
+ # Redis cache mapping a user ID to the last timestamp a bad nickname alert was sent
name_alerts = RedisCache()
def __init__(self, bot: Bot):
@@ -161,7 +161,7 @@ class Filtering(Cog):
"""Send a mod alert every 3 days if a username still matches a watchlist pattern."""
# Use lock to avoid race conditions
async with self.name_lock:
- # Check does nickname have match in filters.
+ # Check whether the users display name contains any words in our blacklist
matches = self.get_name_matches(member.display_name)
if not matches or not await self.check_send_alert(member):