Username normalization #10

Open
opened 2023-03-02 20:38:45 +01:00 by myrkvi · 3 comments
Owner

Add a guild-toggleable feature that allows admins to use the bot to normalise usernames, according to Unicode normalisation rules. This results in some ridiculous Unicode usernames to become a bit more normal.

Add a guild-toggleable feature that allows admins to use the bot to normalise usernames, according to Unicode normalisation rules. This results in some ridiculous Unicode usernames to become a bit more normal.
Author
Owner

Python's standard library has a unicode module that lets us do this pretty easily.

Python's standard library has a unicode module that lets us do this pretty easily.
Owner

So no need to run it throug regex filters? Nice 😌

So no need to run it throug regex filters? Nice 😌
Author
Owner

Nope! It's just a matter of storing the setting for a guild in the database, and when the bot gets an even of someone joining the server, or a user/nick change event, we can check the DB and use this function in Python's stdlib

Nope! It's just a matter of storing the setting for a guild in the database, and when the bot gets an even of someone joining the server, or a user/nick change event, we can check the DB and use [this function](https://docs.python.org/3/library/unicodedata.html#unicodedata.normalize) in Python's stdlib
Sign in to join this conversation.
No description provided.