mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-11-14 01:51:22 +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:
|
||||
word_boundaried = r"\b%s\b" % word
|
||||
regex = re.compile(word_boundaried, re.IGNORECASE)
|
||||
if regex.match(message):
|
||||
if regex.search(message):
|
||||
illegal_post = True
|
||||
illegal_reasons.append("The following word is prohibited: " + word)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user