Closed arqez closed 3 years ago
Code:
const client = new Discord.Client({ ws: { intents: new Discord.Intents.ALL } });
Tell me if this worked for you.
Didn't work, still experiencing the same error.
Error:
What version of discord.js is installed? (check package.json)
const client = new Discord.Client({ ws: { intents: new Discord.Intents( Discord.Intents.PRIVILEGED ) } });
If this did not work attempt the second suggestion.
It should look like this:
const client = new Discord.Client();
How to toggle privileged intents? Read Here
Tell me if this worked for you.
Thank you, second suggestion worked perfectly. Shame that I couldn't think of this earlier. Thank you for the help.
Edit: Tried executing a command, but kept getting (node:11312) UnhandledPromiseRejectionWarning: TypeError: message.mentions.has is not a function
full error below
Provide discord.js version you are using. (Check package.json
file.)
Try the following code:
message.mentions.users.get(client.user.id)
Implement this code in the if statement.
I am on discord.js@12.5.3. Whenever I run a command, it does delete the message now, but does not execute it, and gives me this error instead:
UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'forEach' of undefined
Full error below.
Nevermind, it works. The packages just didn't install properly so I re-installed them. Thank you for your help.
Nevermind, it works. The packages just didn't install properly so I re-installed them. Thank you for your help.
nigga u gon tell us how to do it or what?