Blacklist terms conflict

Asked Oct 28, 2020·10 replies·Last activity 5 years ago·Open in Discord ↗
Archived from the original community forum
Things may have changed since it was written. Still stuck? Ask the community on Discord.

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.

10 replies

Put this in the blacklist terms
/( (\w))+sex( (\w))+/g

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:

/sex(((?!ualpride).)*$|\b)/i

I think @Quirky Fox is on the right track though! I didn't think of using ?!... 🤔

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

/sex(?!ualpride|pride)/i

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... 🤔

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

Didn't find your answer? The community is on Discord.

Ask on Discord