aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Leon Sandøy <[email protected]>2020-07-29 20:15:17 +0200
committerGravatar Leon Sandøy <[email protected]>2020-07-29 20:15:17 +0200
commit48bc968d3c03032beed8ac110b76dc468262a4d3 (patch)
treeea6c61f0e24615230158de7ad75d8735eb29aee1
parentRestructure bot.filter_list_cache. (diff)
word_watchlist -> filter_token in filtering.py.
-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 0951cb740..8670e1c8c 100644
--- a/bot/cogs/filtering.py
+++ b/bot/cogs/filtering.py
@@ -138,7 +138,7 @@ class Filtering(Cog):
def get_name_matches(self, name: str) -> List[re.Match]:
"""Check bad words from passed string (name). Return list of matches."""
matches = []
- watchlist_patterns = self._get_filterlist_items('word_watchlist', allowed=False)
+ watchlist_patterns = self._get_filterlist_items('filter_token', allowed=False)
for pattern in watchlist_patterns:
if match := re.search(pattern, name, flags=re.IGNORECASE):
matches.append(match)
@@ -403,7 +403,7 @@ class Filtering(Cog):
if URL_RE.search(text):
return False
- watchlist_patterns = self._get_filterlist_items('word_watchlist', allowed=False)
+ watchlist_patterns = self._get_filterlist_items('filter_token', allowed=False)
for pattern in watchlist_patterns:
match = re.search(pattern, text, flags=re.IGNORECASE)
if match: