17teen / Discord-Presser-Server-Nuker

Nuke Discord Bot in Js (Beta has arrived)
329 stars 381 forks source link

Discord.Intents.ALL #9

Closed arqez closed 3 years ago

arqez commented 3 years ago

image

17teen commented 3 years ago

Attempt the following:

Code:

const client = new Discord.Client({ ws: { intents: new Discord.Intents.ALL } });
  1. Replace that line of code with the one i just provided.
  2. Re run the programme.

Tell me if this worked for you.

arqez commented 3 years ago

Didn't work, still experiencing the same error.

Error: image

17teen commented 3 years ago

What version of discord.js is installed? (check package.json)

17teen commented 3 years ago

Possible Suggestions

  1. Try implementing the following code:
const client = new Discord.Client({ ws: { intents: new Discord.Intents( Discord.Intents.PRIVILEGED ) } });

If this did not work attempt the second suggestion.

  1. Assuming you have toggled your privileged intents for your bot just remove the whole code.

It should look like this:

const client = new Discord.Client();

How to toggle privileged intents? Read Here

Tell me if this worked for you.

arqez commented 3 years ago

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 image

17teen commented 3 years ago

Provide discord.js version you are using. (Check package.json file.)

17teen commented 3 years ago

Possible Answer:

Try the following code:

message.mentions.users.get(client.user.id)

Implement this code in the if statement.

arqez commented 3 years ago

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. image

arqez commented 3 years ago

Nevermind, it works. The packages just didn't install properly so I re-installed them. Thank you for your help.

extrajumprcl commented 2 years ago

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?