From f2fafa631c06804efb110161560d85122ac45fab Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Mon, 13 May 2019 13:47:59 +0200 Subject: Removing special handling (allowance) for self-deprecating uses of the word 'retarded' from the filter. All bad words are now, once again, equal. --- bot/cogs/filtering.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/bot/cogs/filtering.py b/bot/cogs/filtering.py index 25aaf8420..418297fc4 100644 --- a/bot/cogs/filtering.py +++ b/bot/cogs/filtering.py @@ -27,9 +27,6 @@ INVITE_RE = ( URL_RE = r"(https?://[^\s]+)" ZALGO_RE = r"[\u0300-\u036F\u0489]" -RETARDED_RE = r"(re+)tar+(d+|t+)(ed)?" -SELF_DEPRECATION_RE = fr"((i'?m)|(i am)|(it'?s)|(it is)) (.+? )?{RETARDED_RE}" -RETARDED_QUESTIONS_RE = fr"{RETARDED_RE} questions?" class Filtering: @@ -237,18 +234,6 @@ class Filtering: for expression in Filter.word_watchlist: if re.search(fr"\b{expression}\b", text, re.IGNORECASE): - - # Special handling for `retarded` - if expression == RETARDED_RE: - - # stuff like "I'm just retarded" - if re.search(SELF_DEPRECATION_RE, text, re.IGNORECASE): - return False - - # stuff like "sorry for all the retarded questions" - elif re.search(RETARDED_QUESTIONS_RE, text, re.IGNORECASE): - return False - return True return False -- cgit v1.2.3