Intents error?
so a friend of mine sent me his discord.js bot and well when I configured the .env stuff and pressed run the repl broke and said: node index.js
/home/runner/Proxy-Dispenser/node_modules/@discordjs/ws/dist/index.js:1065
throw new Error("Used disallowed intents");
^
Error: Used disallowed intents
at WebSocketShard.onClose (/home/runner/Proxy-Dispenser/node_modules/@discordjs/ws/dist/index.js:1065:15)
at WebSocket.emit (node:events:513:28)
at WebSocket.emitClose (/home/runner/Proxy-Dispenser/node_modules/ws/lib/websocket.js:258:10)
at TLSSocket.socketOnClose (/home/runner/Proxy-Dispenser/node_modules/ws/lib/websocket.js:1264:15)
at TLSSocket.emit (node:events:525:35)
at node:net:313:12
at TCP.done (node:_tls_wrap:587:7)
Node.js v18.12.1
exit status 1
I am a dev but I have 0 experience with discord bots lmao or what this even means. The intents were provided correctly im pretty sure like so: const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
GatewayIntentBits.GuildMembers,
],
});
10 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!
- ✅
Marked as resolved by OPYou want to check this out: https://discordjs.guide/popular-topics/intents.html
but it was already like this:
isnt that what it says on the page to have?
Node v18.12.0 and discord.js 14.13.0
This is not a code issue, as described in the page I linked.
so this is a permissions issue?
If you bot is verified, yes, otherwise more of a configuration issue.
my bot is not a verified bot (as in the context of having the verified badge if thats what you meant) however I checked the role permissions and it has administrator and message perms and stuff
you need to enable them in the dev portal
ah got it thank you guys