You can send only spaces to the server and have a invisible username, this way you can remove the spaces and check and if it wasn't null after you know it's not just spaces
If you don't delete this property for some reasons after you send a message in a guild, your roles will be removed (client sided) for everyone, this fixes it.