Cannot read properties of undefined (reading 'Guilds')

C:\Users\Administrator2\Desktop\discordbots\Core-main>node index.js
C:\Users\Administrator2\Desktop\discordbots\Core-main\index.js:7
const client = new Client({ intents: [GatewayIntentBits.Guilds] });
^

TypeError: Cannot read properties of undefined (reading 'Guilds')
at Object.<anonymous> (C:\Users\Administrator2\Desktop\discordbots\Core-main\index.js:7:57)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47

Node.js v18.16.1
C:\Users\Administrator2\Desktop\discordbots\Core-main>node index.js
C:\Users\Administrator2\Desktop\discordbots\Core-main\index.js:7
const client = new Client({ intents: [GatewayIntentBits.Guilds] });
^

TypeError: Cannot read properties of undefined (reading 'Guilds')
at Object.<anonymous> (C:\Users\Administrator2\Desktop\discordbots\Core-main\index.js:7:57)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47

Node.js v18.16.1
Code: https://srcb.in/8sj7eDrmfO
6 Replies
d.js toolkit
d.js toolkit12mo ago
- 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 OP
treble/luna
treble/luna12mo ago
what is your djs version
Syjalo
Syjalo12mo ago
Show how did you define GatewayIntentBits
Almaz
AlmazOP12mo ago
13.6.0
treble/luna
treble/luna12mo ago
thats v14 code and 13.6 is deprecated
Almaz
AlmazOP12mo ago
one sec oh sorry im just stupid
Want results from more Discord servers?
Add your server