aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Leon Sandøy <[email protected]>2019-05-13 13:46:43 +0200
committerGravatar Leon Sandøy <[email protected]>2019-05-13 13:46:43 +0200
commit55c978dac3287f1eb0b9ca8a5fa65210bb7a672d (patch)
tree18017f066d33d5e92fc41db8e9bfb655ec5e0425
parentUpdate apt cache in build pipline (diff)
Removing special handling (allowance) for self-deprecating uses of the word 'retarded' from the filter. All bad words are now, once again, equal.
-rw-r--r--bot/cogs/filtering.py15
1 files changed, 0 insertions, 15 deletions
diff --git a/bot/cogs/filtering.py b/bot/cogs/filtering.py
index f5811d9d2..d1a0de89e 100644
--- a/bot/cogs/filtering.py
+++ b/bot/cogs/filtering.py
@@ -24,9 +24,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:
@@ -151,18 +148,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