Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to fix this? #62

Open
hdfhdfhdfhfddfdf opened this issue Mar 24, 2022 · 1 comment
Open

How to fix this? #62

hdfhdfhdfhfddfdf opened this issue Mar 24, 2022 · 1 comment

Comments

@hdfhdfhdfhfddfdf
Copy link

I get This Error from the command prompt

C:\Users\eimaa\dcstick\node_modules\discord.js\src\client\Client.js:548
throw new TypeError('CLIENT_MISSING_INTENTS');
^

TypeError [CLIENT_MISSING_INTENTS]: Valid intents must be provided for the Client.
at Client._validateOptions (C:\Users\eimaa\dcstick\node_modules\discord.js\src\client\Client.js:548:13)
at new Client (C:\Users\eimaa\dcstick\node_modules\discord.js\src\client\Client.js:76:10)
at Object. (C:\Users\eimaa\dcstick\index.js:3:16)
at Module._compile (node:internal/modules/cjs/loader:1099:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:975:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
at node:internal/main/run_main_module:17:47 {
[Symbol(code)]: 'CLIENT_MISSING_INTENTS'

@just-rich
Copy link

just-rich commented Jun 30, 2022

replace this

const client = new Discord.Client({
ws: {
intents: [
"GUILDS",
"GUILD_MESSAGES",
],
},
});

with this

const { Client, Intents } = require('discord.js');

const client = new Client({ intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES] })

in the index.js file, youll see it at the top

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants