I keep researching alternatives, and every time I circle back around toward Matrix, despite criticisms. Part of it is a question of what everyone is using. I pretty consistently see that groups who use or used to use irc are now using Matrix additionally or as a replacement.
Part of me would like xmpp to be the best answer, but I've yet to see an implementation that handles public communities well, particularly for anything that functions at all like Discord. Matrix seems to be at least gaining voice/video chat support?
Maybe we can use this as an opportunity to use different tools for different purposes. Text chat is the easy part, evidently. The issues seem to be around voice/video/group chat on one side, and forums/wikis on the other.
What we need to recognize for one thing is how Discord makes it easy to host info repositories, but sucks at making that stuff accessible. We need a decentralized platform that makes it easy for someone to sign up and create their own forums and wikis in a user-friendly point and click manner that Discord does, but makes those same hubs optionally public and viewable for users without having to join anything.
Then for more live-oriented stuff, Matrix is already the most mature, established, closest thing to Discord we have. We just need it to be better at voice, video, screen-sharing, etc. If I understand correctly, that's already being worked on.
Hell, maybe the former could very well be implemented on top of Matrix itself even.