Something with BitFieldInvalid error on my bot.
i am trying to solve this problem, he start about 1h ago
/Users/macbookdrink/Desktop/Astarion-Bot/node_modules/discord.js/src/util/BitField.js:172
throw new DiscordjsRangeError(ErrorCodes.BitFieldInvalid, bit);
^
RangeError [BitFieldInvalid]: Invalid bitfield flag or number: GUILDS.
at IntentsBitField.resolve (/Users/macbookdrink/Desktop/Astarion-Bot/node_modules/discord.js/src/util/BitField.js:172:11)
at /Users/macbookdrink/Desktop/Astarion-Bot/node_modules/discord.js/src/util/BitField.js:167:54
at Array.map (<anonymous>)
at IntentsBitField.resolve (/Users/macbookdrink/Desktop/Astarion-Bot/node_modules/discord.js/src/util/BitField.js:167:40)
at new BitField (/Users/macbookdrink/Desktop/Astarion-Bot/node_modules/discord.js/src/util/BitField.js:33:38)
at new IntentsBitField (/Users/macbookdrink/Desktop/Astarion-Bot/node_modules/discord.js/src/util/IntentsBitField.js:9:1)
at Client._validateOptions (/Users/macbookdrink/Desktop/Astarion-Bot/node_modules/discord.js/src/client/Client.js:511:25)
at new Client (/Users/macbookdrink/Desktop/Astarion-Bot/node_modules/discord.js/src/client/Client.js:78:10)
at Object.<anonymous> (/Users/macbookdrink/Desktop/Astarion-Bot/index.js:2:16)
at Module._compile (node:internal/modules/cjs/loader:1256:14) {
code: 'BitFieldInvalid'
}
Node.js v18.17.1
9 Replies
- 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!RangeError [BitFieldInvalid]: Invalid bitfield flag or number: undefined
- All SCREAMING_SNAKE_CASE
enums have been changed to PascalCase
- Intents: Intents.FLAGS.GUILD_MESSAGES
-> GatewayIntentBits.GuildMessages
- Permissions: Permissions.FLAGS.SEND_MESSAGES
-> PermissionFlagsBits.SendMessages
please read what people send you
what?
where
you were sent the same tag
regardless
its PascalCase in v14
ok
i will try.
ook seems solved but i found other problem
2023-08-20T21:03:02.927355678Z const embed = new MessageEmbed()
2023-08-20T21:03:02.927361108Z ^
2023-08-20T21:03:02.927365406Z
2023-08-20T21:03:02.927369805Z ReferenceError: MessageEmbed is not defined 2023-08-20T21:03:02.927374303Z at Client.<anonymous> (/home/node/main.js:20:27) 2023-08-20T21:03:02.927379253Z at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 2023-08-20T21:03:02.927383711Z
2023-08-20T21:03:02.927387739Z Node.js v18.17.1
2023-08-20T21:03:02.927369805Z ReferenceError: MessageEmbed is not defined 2023-08-20T21:03:02.927374303Z at Client.<anonymous> (/home/node/main.js:20:27) 2023-08-20T21:03:02.927379253Z at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 2023-08-20T21:03:02.927383711Z
2023-08-20T21:03:02.927387739Z Node.js v18.17.1
thats v13 code
yep
need to crete other quest?