CorwinDev / Discord-Bot

Discord Bot with over 400 commands and made for large servers
MIT License
656 stars 599 forks source link

Privileged intent provided is not enabled or whitelisted. #142

Closed NotGravehound closed 1 year ago

NotGravehound commented 1 year ago

Error [DisallowedIntents]: Privileged intent provided is not enabled or whitelisted. at WebSocketManager.createShards (/home/runner/Discord-Bot-V14/node_modules/discord.js/src/client/websocket/WebSocketManager.js:250:15) at async Client.login (/home/runner/Discord-Bot-V14/node_modules/discord.js/src/client/Client.js:226:7)

dev-jhon-yo commented 1 year ago

This error occurs because your application is trying to use a privilege that has not been enabled for your bot. There are several privileges that can be used with the Discord API, but not all of them are enabled by default.

To resolve this error, you need to enable the desired privilege in your bot's settings in the Discord developer dashboard.

To activate a privilege, follow these steps:

  1. Access the Discord Developer Dashboard.
  2. Select your application/bot.
  3. In the "Bot" section of the side menu, find the "Privileged Gateway Intents" section.
  4. Enable required privileges for your bot. For example, if your bot needs to read messages sent on the server, you must enable the "SERVER MEMBERS INTENT" privilege.

Remember to save changes after activating required privileges. After that, restart your bot and the error should no longer occur.