diff options
author | 2021-12-06 22:59:35 +0000 | |
---|---|---|
committer | 2021-12-06 23:08:09 +0000 | |
commit | d0dc7a0e4e3fc6618ae49d43b24938c84793dcf0 (patch) | |
tree | b2914a111258424dcd31407c39f73620229d2baa | |
parent | Also run name filters against a cleaned version of the normalised name (diff) |
Build an intermediate list for speed in filtering cog
-rw-r--r-- | bot/exts/filters/filtering.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/exts/filters/filtering.py b/bot/exts/filters/filtering.py index 21ed090ea..8accc61f8 100644 --- a/bot/exts/filters/filtering.py +++ b/bot/exts/filters/filtering.py @@ -209,7 +209,7 @@ class Filtering(Cog): def get_name_match(self, name: str) -> Optional[re.Match]: """Check bad words from passed string (name). Return the first match found.""" normalised_name = unicodedata.normalize("NFKC", name) - cleaned_normalised_name = "".join(c for c in normalised_name if not unicodedata.combining(c)) + cleaned_normalised_name = "".join([c for c in normalised_name if not unicodedata.combining(c)]) # Run filters against normalised, cleaned normalised and the original name, # in case we have filters for one but not the other. |