Blacklist terms conflict

There is a situation in the twitch chat that I’m modding for where we have the term “sex” (without the quotes and with asterisks on both sides) blocked through twitch for obvious reasons, but the problem is emotes such as BisexualPride, PansexualPride, Intersexpride, ect. are blocked as a result, adding them as permitted terms does not work, so I was hoping that there would be a way with Nightbot blacklist filters to block “sex” but not the emotes.

Put this in the blacklist terms


Or simpler: /\bsex\b/i
Here’s a good RegExp reference if you need an explanation.


there are 4 pride emotes that have “sex” in them: AsexualPride IntersexPride PansexualPride BisexualPride, is there a way to only allow “sex” to be used in these emotes and no other context? Because right now, people can just type “sex” and put a random letter behind or in front to bypass the filter. ty

There is no whitelist, so no, either you only block “sex” as a word itself, or you block any word containing the subword “sex” in it, there’s no way to detect if it’s part of an allowed word or if characters are just added to bypass the blacklist, that would be possible if their was a whitelist along the blacklist.


Try this:


I tried it, and it didn’t work

1 Like

I think @potatoeaterlove is on the right track though! I didn’t think of using ?!:thinking:

Don’t make things so complicated, this should work just fine:


It didn’t work, I tried something like
/(sex)[^up]+/gi and /([^ainr]+sex)/gi
to block stuff that didn’t have the letters “a, i, n, or r” before the word “sex” and the letters “u and p” immediately after. It kinda worked, but was still able to be easily bypassed

If someone is actively trying to bypass it have you considered just banning said person(s)?

That’s weird because I did test it with a sentence containing all the emotes you’re trying to allow and “sex” and variations of it such as “sexy” or like “aaasexbbb” and it did detect all the words containing “sex” in it, but not the emotes… :thinking:

You can see it working here, I made a small example.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.