There were potential competitors back when it really didn't matter - the early 00s. Even AIM at its feature peak could do pretty much everything Discord can do now (save for some of the server organization and custom content), but only a fraction in the US had Broadband to take advantage of it.
And it wasn't written in resource-hungry Electron.
Demand wasn't there. Gaming was seen way more as "that thing nerds do" and online communities where mostly about very async forums.
Now gaming has hit main stream and is accepted by everyone. Forum concept has been dead in the water for years and everyone has moved go mobile first social medias, but none of the other social medias fill the niche of IM & VoIP.
As side note: we can gripe about Discord being electron based all we want, but that is actually a huge selling point. Discord just works on all platforms with all features. Even Linux is not some shitty after thought that has 3rd party gobbled together client that requires 10 hours of tweaking each week just to keep running. Then obviously the same code base runs on browsers.
I'm working from memory, but AIM at the peak had webcam support and a very rudimentary screen share component. I keep thinking the name of it was "AIM Share", but Googling that does not bring up mentions of it.
And it wasn't written in resource-hungry Electron.