TypeError: Cannot read properties of undefined (reading 'FLAGS')
Hello, I got an error with the flags. Could someone help?
42 Replies
• What's your exact discord.js
npm list discord.js
and node node -v
version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.Full Error: TypeError: Cannot read properties of undefined (reading 'FLAGS')
at Object.<anonymous> (C:\Users\user\ServerMaster\bot.js:2:47)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47
Node.js Version: 18.15.0
Discord.js Version: 14.8.0
Ok, done
now theres
ReferenceError: Client is not defined
at Object.<anonymous> (C:\Users\user\ServerMaster\bot.js:2:16)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47
got this now
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
i just relized atm
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
now the bitfield is invalid...
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
RangeError [BitFieldInvalid]: Invalid bitfield flag or number: undefined.
at IntentsBitField.resolve (C:\Users\user\ServerMaster\node_modules\discord.js\src\util\BitField.js:170:11)
at C:\Users\user\ServerMaster\node_modules\discord.js\src\util\BitField.js:165:54
at Array.map (<anonymous>)
at IntentsBitField.resolve (C:\Users\user\ServerMaster\node_modules\discord.js\src\util\BitField.js:165:40)
at new BitField (C:\Users\user\ServerMaster\node_modules\discord.js\src\util\BitField.js:33:38)
at new IntentsBitField (C:\Users\user\ServerMaster\node_modules\discord.js\src\util\IntentsBitField.js:9:1)
at Client._validateOptions (C:\Users\user\ServerMaster\node_modules\discord.js\src\client\Client.js:491:25)
at new Client (C:\Users\user\ServerMaster\node_modules\discord.js\src\client\Client.js:78:10)
at Object.<anonymous> (C:\Users\user\ServerMaster\bot.js:2:16)
at Module._compile (node:internal/modules/cjs/loader:1254:14) {
code: 'BitFieldInvalid'
oh
but the s is in the code so
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Ok
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
yep
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
hmm i could try
you mean like this?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Discord is not definied
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
yup.
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
No, but its still the same error then
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
cant click.
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
No
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
yes
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
It's still there.
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
yes
for now
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
ok
worked
...
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Ok. So the bot should work with application commands, but it isnt listed thre.
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
hmm ok, well thank you anyways, sinc the bot is running.
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View