aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/cogs/filtering.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/bot/cogs/filtering.py b/bot/cogs/filtering.py
index 909c5b78f..dbe7c6bc7 100644
--- a/bot/cogs/filtering.py
+++ b/bot/cogs/filtering.py
@@ -43,6 +43,8 @@ TOKEN_WATCHLIST_PATTERNS = [
]
WATCHLIST_PATTERNS = WORD_WATCHLIST_PATTERNS + TOKEN_WATCHLIST_PATTERNS
+DAYS_BETWEEN_ALERTS = 3
+
def expand_spoilers(text: str) -> str:
"""Return a string containing all interpretations of a spoilered message."""
@@ -152,7 +154,7 @@ class Filtering(Cog):
last_alert = await self.name_alerts.get(msg.author.id)
if last_alert:
last_alert = datetime.fromtimestamp(last_alert)
- if datetime.now() - timedelta(days=3) < last_alert:
+ if datetime.now() - timedelta(days=DAYS_BETWEEN_ALERTS) < last_alert:
return
log_string = (