Count specific characters and remove comments

Asked Dec 25, 2021·2 replies·Last activity 4 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.

Please help me about [ Spam Protection ].

I have a channel who can chat in English, but someone types chatters in Japanese.
So I want to automatically delete Japanese chat.

example1 :
Set a specific Japanese character string.
Over 5 count of specific characters, then delete the comment.
Custom message: " Please write in English."

Example2 as VBA code :

badChr = "あいうえおかきくけこたちつてとなにぬねのわをん"
chatStr= "こんにちは!今日はいい日ですね!"

if InStr(chatStr, badChr) >= 5 then
DELETE_CHAT
CustomMessage = " Please write in English."
end if

It is what I want to do.Can I make this filter on NightBot?
Please help me. Thanks.

2 replies

Thank you Emily!

OK, I will try to that! Thank you!