mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-12-25 14:37:02 +01:00
Fix banned words regex handler
This commit is contained in:
parent
7ac24a8981
commit
012700ee7e
@ -69,7 +69,7 @@ def format_post_content(guild_id, channel_id, message, dbUser):
|
|||||||
for word in banned_words:
|
for word in banned_words:
|
||||||
word_boundaried = r"\b%s\b" % word
|
word_boundaried = r"\b%s\b" % word
|
||||||
regex = re.compile(word_boundaried, re.IGNORECASE)
|
regex = re.compile(word_boundaried, re.IGNORECASE)
|
||||||
if regex.match(message):
|
if regex.search(message):
|
||||||
illegal_post = True
|
illegal_post = True
|
||||||
illegal_reasons.append("The following word is prohibited: " + word)
|
illegal_reasons.append("The following word is prohibited: " + word)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user