Configuring the Blacklist (with RegExp)

Hello, I don’t know English well, but I will try to describe what I want. I need only 2 languages allowed in the chat. Russian and English. And emoticons from android (u1F300-u1F5FF).
I was able to resolve two languages, but I can’t resolve emoticons in any way. How can this be done?

Hey @simferoxp!

What is the content of your blacklist right now?

1 Like

At first I added everything worked.
But the audience sent android emoticons to the chat. And for this, Nightbot issued a ban to them.
I had to add, but it doesn’t work…

You can try /^(\uD83C[\uDF00-\uDFFF])|^(\uD83D[\uDC00-\uDDFF])/, but I’m not sure it’ll work.
Also put the RegExp on new lines, and not separated by comma.

1 Like

I added it to the blacklist, but it doesn’t work …

I slightly modified the RegExp I gave in my previous reply since your reply, you might want to try it, but still no guarantee that it’ll work, it seems to hit the limits of what RegExp can do by itself.

1 Like

I saw the change and fixed it in the blacklist.
The new version doesn’t work either

The blacklist should have 1 line with /^(\uD83C[\uDF00-\uDFFF])|^(\uD83D[\uDC00-\uDDFF])/ ???

Yes.
I was strongly doubting that it would work. \uXXXX only work with 4 characters, not with 5 like our case here, that’s why I gave you the other code, however, on the solution I found online, it still failed and they had to rely on extra code, which we can’t do here.

1 Like

I saw on another channel that 1 language is allowed there (English) and all other languages are not allowed in the chat. But you can write android emoticons there…
The owner of the channel does not answer questions (

Do you mean that Nightbot moderates characters that are outside of the latin alphabet? Because there’s a difference between “not allowed” and “automatically moderated by a bot,” the former would still allow to write in different alphabets without punishing you. If Nightbot automatically takes action, then I suggest trying to reach out to them again or one of their mods as I don’t have the solution. And if you get an answer, please share it here, I’m curious to know too.

1 Like

The nightbot on that channel allows English language and android emoticons. It prohibits all other languages.
I have already written there, asked them. But they don’t respond.
You can see for yourself: Twitch

Then can I do it differently?
Not “allow one language, and prohibit others”, but vice versa. Only prohibit the entire language?
For example: prohibit each language separately.
Yes, there are a lot of languages and there will be a lot of lines on the blocklist

prohibit each language separately.

Yes you could do that, that would be a solution, allow me to redirect you to an older post of mine then, where there’s a link for all the unicode values:

1 Like

Thank you for the help you provide!
But could you show me exactly how to write it? I write [\u0600-\u06FF]+ - but nothing happens… Probably need to put ^? Or /?

^ is to say not so ^[\u0600-\u06FF]+ will block every characters that aren’t Arabic.
Even tho’ in my experience [\u0600-\u06FF]+ works, you can use /[\u0600-\u06FF]+/ in the blacklist to block every Arabic characters, but if you test the filter with a moderator or owner account, it bypasses it.

2 Likes

Great! I’m still checking, but everything seems to be working! Thanks!

1 Like

Awesome, I’m glad to hear that!

2 Likes

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