Nightbot Blacklist Problem with Ö/Ä/Ü

Asked May 4, 2021·4 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.

Hello,
this is (probably) a German problem only but if "hs" is on the blacklist, something like "frühs" would be getting timeouted, because apparently the letters ö/ä/ü are seen as spaces. Words like "Frühstück" are fine, because the word doesn't end with the letters "hs".
Is there anything to fix this? Include some kind of exception?
Thank you very much

4 replies

Hey @Wise Hedgehog!

I think you can solve this issue by using regular expressions. You want to blacklist hs or HS when it's by itself right?
Copy/paste this into your blacklist filter: /\shs\s/i

Hello @Polar Cat,
thank you very much for taking the time to answer. Unfortunately your solution prevents a "hs" on its own from being timeouted, it only works in a message like "test hs test". However "frühs" is not timeouted, so thats an improvement :D
I will however take the opportunity to read more into the Regex stuff and if I come across a solution that works before the topic closes, I will post it here in case anyone might ever need it as well

~/([^\wüöä]|^)hs([^\wüöä]|$)/i seems to work, it timeouts "hs", "HS", "hs test", "test hs test" and "test hs" while keeping "frühs" in the chat :D
Thank you for getting me started on this, really confusing but lots of options

Yeah, I'm sorry, I realized only later that I made a small mistake in the RegExp I gave you, but I didn't have time to let you know sooner: /\bhs\b/i is what you need.