Skip to content

Commit

Permalink
blacklist: lowercase special triggers before comparing
Browse files Browse the repository at this point in the history
  • Loading branch information
jerbmega committed Dec 8, 2022
1 parent 8aea335 commit 33377c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/blacklist.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ async def is_blacklisted(message: hikari.Message):
# Try a standard blacklist next, works for filtering copypastas, Discord invites and such
if "special_triggers" in plugin.d["config"][message.guild_id]:
for trigger in plugin.d["config"][message.guild_id]["special_triggers"]:
if trigger in re.sub(
if trigger.lower() in re.sub(
r"\s+",
"",
message.content,
message.content.lower(),
flags=re.UNICODE,
):
return True
Expand Down

0 comments on commit 33377c7

Please sign in to comment.