Invalid bitfield flag or number: GUILDS

I am having difficulty getting a basic Discord bot to run. I copied the code (literally copied and pasted) from the Replit Docs, and I get these errors:

RangeError [BitFieldInvalid]: Invalid bitfield flag or number: GUILDS.
    at IntentsBitField.resolve (/home/runner/Boundary-Rider/node_modules/discord.js/src/util/BitField.js:172:11)
    at /home/runner/Boundary-Rider/node_modules/discord.js/src/util/BitField.js:167:54
    at Array.map (<anonymous>)
    at IntentsBitField.resolve (/home/runner/Boundary-Rider/node_modules/discord.js/src/util/BitField.js:167:40)
    at new BitField (/home/runner/Boundary-Rider/node_modules/discord.js/src/util/BitField.js:33:38)
    at new IntentsBitField (/home/runner/Boundary-Rider/node_modules/discord.js/src/util/IntentsBitField.js:9:1)
    at Client._validateOptions (/home/runner/Boundary-Rider/node_modules/discord.js/src/client/Client.js:494:25)
    at new Client (/home/runner/Boundary-Rider/node_modules/discord.js/src/client/Client.js:78:10)
    at Object.<anonymous> (/home/runner/Boundary-Rider/index.js:3:16)

My project is called Boundary Rider. I have no idea what is the problem here, any help is greatly appreciated.

Welcome to Ask @CalebTivendale!
Try this:

1 Like

That works, thanks for your help!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.