Realistically this would be another service attached to the government ID. Something like this does function in some European countries, doesn’t it?
I can imagine you could share just your DOB in such a case, while keeping your real identity private. In such a way Discord would learn only your age, keeping everything else from them.
Government learns that Discord was provided your data, but this is supposedly a trusted, regulated entity.
In your model, government now know you are on discord -- they know where to ask when they want to find you.
It really depends which government you are under.