'Discord Music Bot Wont Boot

So Im making a discord music bot (not for public) and its based off some github code and I put it in and gives me this, I had the node:events problem and fixed it (maybe) and saw this

Error [DISALLOWED_INTENTS]: Privileged intent provided is not enabled or whitelisted.
    at WebSocketManager.createShards (/home/runner/AttachedStingyMiddleware/node_modules/discord.js/src/client/websocket/WebSocketManager.js:250:15)
    at async Client.login (/home/runner/AttachedStingyMiddleware/node_modules/discord.js/src/client/Client.js:254:7) {
  [Symbol(code)]: 'DISALLOWED_INTENTS'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node .`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/runner/.npm/_logs/2022-01-16T06_06_23_431Z-debug.log
exit status 1
``
is the error


Solution 1:[1]

This error means that you didn't enable privileged intents.

When connecting to Discord, you provide a list of events to listen(this is intents). Privileged intents are special intents that might contain sensitive information.

Currently it includes user presence related events and guild member related events. After April 30, message content related events will be privileged, too.

To enable privileged intents, go to Discord dev portal, click your bot, and go to 'Bot' tab. Enable these 3 intents and save.

enter image description here

Then there will be no intents related error.

Solution 2:[2]

Privileged intents are needed to be enabled in your discord developer portal before being used.

If you do not have the required criteria to enable privileged intents, remove those intents and related features from the code and bot will still work.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 mswgen
Solution 2 Kaamil Mirza