Every time I see this I feel so sad. IRC was definitely not perfect, the security was crap and the user experience was awkward, but it was possible to have a fully open source self hosted stack. Discord is not a viable alternative in my mind.
Element/Matrix is a bit dodgy to me, with a lot of questionable stuff around original funding and development not to mention the amount of clearly illegal and immoral stuff on it, but at least you can run your own server in theory. I don't know what the solution is, but it needs to have a lot of people on it to work so it needs to be easy and quick to get set up on, and ideally without the kind of verification stuff discord has.