Discord is not open-source, so I don't see how it's relevant; it's "communities" are primarily gamers & streamers. While there are some open-source communities based on Discord, the same goes for other closed-source platforms such as Slack & Telegram, and I'm sure the number of software development communities on Slack is (sadly) much larger than on Discord.
Of actual open-source options: Gitter, Discourse, Rocket, Mattermost, etc. - Matrix would seem to be competing relatively well.