#hi my bot v12 but ı upgrade to v14 but nor working beacuse ı cant do intents who can help me ?pls

21 messages · Page 1 of 1 (latest)

quiet nymph
#

ı dont know why not working but ı can send error and code

floral breachBOT
#

• 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.

dark lagoonBOT
#

guide Additional Information: Updating from v12 to v13
read more

#

guide Additional Information: Updating from v13 to v14
read more

quiet nymph
#

my code is not working ı send you

#

C:\Users\erene\Desktop\KODLAMA\Warden\warden.js:8
Discord.Intents.FLAGS.GUILDS,
^

TypeError: Cannot read properties of undefined (reading 'FLAGS')
at Object.<anonymous> (C:\Users\erene\Desktop\KODLAMA\Warden\warden.js:8:21)
at Module._compile (node:internal/modules/cjs/loader:1126:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10)
at Module.load (node:internal/modules/cjs/loader:1004:32)
at Function.Module._load (node:internal/modules/cjs/loader:839:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:17:47

This is my error

#

ı talking AI but he cant solve it

#

ı dont underdstand guide

prime nimbus
#

You updated your code to v13 successfully. But not v14.

dark lagoonBOT
#

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
quiet nymph
zenith geode
#

Yeah, ChatGPT is not good at writing discord.js

quiet nymph
#

how ı upgrade code v14

prime nimbus
quiet nymph
#

for code

prime nimbus
#

The guide I sent does have code examples (with before and after even)

quiet nymph
#

inşallah olur yoksa olmaz :(

quiet nymph
prime nimbus
#

That’s only a v12->v13 converter. Follow the upgrade guide for 13->14