Javascript itself is not the issue. You can have horrible code written in any language, and this is exactly what this is. The management behind Discord are sinking the company
Here we see the average JS hater, unaware of that which they criticize. Luckily, a new framework will be released before the coming winter to provide them with sustenance.
They're already using an Electron version that supports audio sharing iirc, they just default to their custom implementation which doesn't work on Linux