Unknow Error with Intents.FLAGS.Guilds,

So Once I added the code for a interaction called user-bolo now there is a error.
6 Replies
d.js toolkit
d.js toolkit5mo 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
8m3ta
8m3taOP5mo ago
C:\Users\flnrl\OneDrive\Desktop\LoopPing\src\index.js:7
Intents.FLAGS.Guilds,
^

TypeError: Cannot read properties of undefined (reading 'FLAGS')
at Object.<anonymous> (C:\Users\flnrl\OneDrive\Desktop\LoopPing\src\index.js:7:17)
at Module._compile (node:internal/modules/cjs/loader:1241:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
at Module.load (node:internal/modules/cjs/loader:1091:32)
at Module._load (node:internal/modules/cjs/loader:938:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
at node:internal/main/run_main_module:23:47

Node.js v20.9.0
[nodemon] app crashed - waiting for file changes before starting...
[nodemon] restarting due to changes...
[nodemon] starting `node ./src/index.js`
C:\Users\flnrl\OneDrive\Desktop\LoopPing\src\index.js:7
Intents.FLAGS.Guilds,
^

TypeError: Cannot read properties of undefined (reading 'FLAGS')
at Object.<anonymous> (C:\Users\flnrl\OneDrive\Desktop\LoopPing\src\index.js:7:17)
at Module._compile (node:internal/modules/cjs/loader:1241:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
at Module.load (node:internal/modules/cjs/loader:1091:32)
at Module._load (node:internal/modules/cjs/loader:938:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
at node:internal/main/run_main_module:23:47

Node.js v20.9.0
[nodemon] app crashed - waiting for file changes before starting...
C:\Users\flnrl\OneDrive\Desktop\LoopPing\src\index.js:7
Intents.FLAGS.Guilds,
^

TypeError: Cannot read properties of undefined (reading 'FLAGS')
at Object.<anonymous> (C:\Users\flnrl\OneDrive\Desktop\LoopPing\src\index.js:7:17)
at Module._compile (node:internal/modules/cjs/loader:1241:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
at Module.load (node:internal/modules/cjs/loader:1091:32)
at Module._load (node:internal/modules/cjs/loader:938:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
at node:internal/main/run_main_module:23:47

Node.js v20.9.0
[nodemon] app crashed - waiting for file changes before starting...
[nodemon] restarting due to changes...
[nodemon] starting `node ./src/index.js`
C:\Users\flnrl\OneDrive\Desktop\LoopPing\src\index.js:7
Intents.FLAGS.Guilds,
^

TypeError: Cannot read properties of undefined (reading 'FLAGS')
at Object.<anonymous> (C:\Users\flnrl\OneDrive\Desktop\LoopPing\src\index.js:7:17)
at Module._compile (node:internal/modules/cjs/loader:1241:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
at Module.load (node:internal/modules/cjs/loader:1091:32)
at Module._load (node:internal/modules/cjs/loader:938:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
at node:internal/main/run_main_module:23:47

Node.js v20.9.0
[nodemon] app crashed - waiting for file changes before starting...
const client = new Client({
intents: [
Intents.FLAGS.Guilds,
Intents.FLAGS.GuildMessages,
Intents.FLAGS.MessageContent
]
});
const client = new Client({
intents: [
Intents.FLAGS.Guilds,
Intents.FLAGS.GuildMessages,
Intents.FLAGS.MessageContent
]
});
chewie
chewie5mo ago
Intents is undefined, use GatewayIntentBits
d.js docs
d.js docs5mo ago
:dtypes: v10: GatewayIntentBits read more
8m3ta
8m3taOP5mo ago
oK Wait for each Intent that I have and the "intents" thing nvm
VIX
VIX5mo ago
yes for every intent replace intents.flags by GatewayIntentBits
Want results from more Discord servers?
Add your server