zaanposni / discord-masz

MASZ is a selfhostable highly sophisticated moderation bot for Discord. Includes a web dashboard and a discord bot.
https://discord.gg/5zjpzw6h3S
Other
71 stars 17 forks source link

Feature that can detect and remove hard to mention usernames #524

Closed UponAnonymous closed 2 years ago

UponAnonymous commented 2 years ago

Every server that I have been a part of always has to have someone that has a name you can't mention, either because it's Zalgo or some copy and paste text from online. That's why this suggestion is to help crack down on that in servers.

The way it could work is that when someone joins the server and their name isn't able to be mentioned the bot does one of two things, it can either attempt to change the users nickname to something that's mentionable. Or it'll ask the user to change their name to something in a certain time limit (if set) or faced being kicked/banned.

These could also be configured to the owner/admins liking, by either making it that the bot will attempt to try and guess the username or just put a temporary nickname, to if the user should be given a warning to change their username or be kicked/banned in x amount of times or just making the bot kick/ban the user.

zaanposni commented 2 years ago

Do you have a suggestion on how to detect zalgo given that there are different cultures that might count different characters as zalgo while others dont?

UponAnonymous commented 2 years ago

Do you have a suggestion on how to detect zalgo given that there are different cultures that might count different characters as zalgo while others dont?

As of now, I'm looking for a way to work around this issue. Once I have found one I'll reply to this issue.

EDIT: A workaround was sent in DMs

zaanposni commented 2 years ago

https://stackoverflow.com/questions/61519041/regex-to-detect-zalgo

https://dev.to/limonsafayet/check-if-a-string-contains-zalgo-text-10lg

zaanposni commented 2 years ago

Zalgo mode is added in v3.1.0 release branch.

image image