I setup a Mattermost server for me and the boys. It’s more slack than discord. But chat, rooms and voice all worked. Push notifications worked on android and Apple. But, I had to admit defeat. No one wants to leave discord because they all have at least 1 friend who won’t leave it.
I tried to self hosted matrix, but it suffered the same feigned interest.
Discord is a closed source system. Matrix with a discord bridge would work. You just use your matrix server and a bot to send and receive on your behalf. There is functionality between but technically the two systems are independent. I also see issues with it not being 100% all the time. Typical of something bridging to a closed system.
What compatibility are you looking for? A non discord application connected directly to a discord server and can send text, audio and visual via discord infrastructure? Nah, probably won’t happen. Bridging is the closest right now.