If that’s the case, you need to fix Discord using the steps below. Don’t forget that if the Discord app is not working on your PC or Mac, you can still use the Discord website or Discord mobile app to access your servers.
Uninstall BetterDiscord (if applicable)
As this issue arises when you are trying to run some custom scripts using BetterDiscord, the first thing we recommend is to uninstall BetterDiscord as it might be the root cause of this issue. Also, official Discord support will not provide any assistance because using BetterDiscord is a violation of their Terms of Service. To uninstall BetterDiscord, follow these steps:-
Reinstall Discord correctly
Whitelist of discord files in your antivirus
If you are having this issue while installing Discord. Some users have experienced a situation where their antivirus (Avast in most cases) accidentally quarantined some of the installer files needed for the update or for the installation to complete, thinking it was a potentially dangerous file. You will have to locate the file and whitelist it for the installation process to continue. Follow the instructions below to do this with your Avast antivirus.
To prevent this confusion from happening again with a different file, you will need to set up the installer and the tool itself as an exception in Avast antivirus, depending on whether the error occurred during the installation phase or after it was already installed.