The Discord example for an electron app is actually just extracting a deb package, so it doesn't tell you much about building the electron app.
Perhaps Signal would be a more useful example.
*Reported from: https://documentation.ubuntu.com/snapcraft/stable/how-to/integrations/craft-an-electron-app/