'Im coding a discord bot for the first time and when i type node . my discord bot wont go online i dont know why
this is my code
const Discord = require("discord.js")
const client = new Discord.Client({ intents: 32767 });
client.login("my token")
and when i run it and type node . into my terminal this is what happens
Error [DISALLOWED_INTENTS]: Privileged intent provided is not enabled or whitelisted.
at WebSocketManager.createShards (/Users/sinanfarista/Desktop/discordBot#1/node_modules/discord.js/src/client/websocket/WebSocketManager.js:250:15)
at async Client.login (/Users/sinanfarista/Desktop/discordBot#1/node_modules/discord.js/src/client/Client.js:254:7) {
[Symbol(code)]: 'DISALLOWED_INTENTS'
}
Solution 1:[1]
you're probably attempting to use an intent that hasn't been enabled.
You must go to the Discord Developer Portal, select your application, navigate to the Bot section, and enable all of the intents. (Or the ones you're currently using.)
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 | Suleyman Celik |

