I want to highlight that this is not realistically possible for anyone, not right now anyway.
When Discord was created, XMPP was the only option if you wanted to adopt an open standard, and it was absolutely not up to the task. Matrix was also an option but far too new.
Discord is a startup, and is run as a business (just like Slack). If you were at the head of a startup in the messaging space, and there were no reasonable open source options for messaging, you'd design your own. This is a hard process; making it an open protocol from the get-go removes a lot of your freedom.
I used to say (even here on HN) that Google was our best hope at creating a modern open source messaging protocol, by improving Hangouts and making it open. They have utterly failed.
I am confident Discord is our next best hope... assuming they succeed. Otherwise, it's back to waiting for Matrix to finish playing catchup.