Blocking specific emoji

I help out with a few youtube live chats (regular status, additional commands, but not a mod/admin) and wanted to suggest blocking a few “naughtier” emoji like the middle finger and poop. “poop” is already on the blacklist but not the emoji. I don’t have access to the bot settings to beta test and wanted to have my ducks in a row before making suggestions to the channel admins.

The emoji are long Unicode sequences and I’m not 100% sure of the exact version of regex used by NB. Is it Python style or JS style? As an example the middle finger is U+1F595. \u (match unicode) only works with four digit sequences.

Is one of these correct?

Do I need to add a global flag?


Nightbot uses the JS style of regex so something like this would work for both the middle finger and poop emojis (note the u flag).


The global flag isn’t really necessary as Nightbot will timeout the entire message if a single match is found.

1 Like

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