rebelchris / discord-slash-bot

0 stars 4 forks source link

why does the code for the index.js file not work #2

Open Venus5687 opened 5 months ago

Venus5687 commented 5 months ago

I modified it with my bot's things and I get this. const client = new Client({ intents: [Intents.FLAGS.GUILDS] }); ^

TypeError: Cannot read properties of undefined (reading 'FLAGS') at Object. (C:\Users\User\discord-slash-bot\index.js:2:47) at Module._compile (node:internal/modules/cjs/loader:1358:14) at Module._extensions..js (node:internal/modules/cjs/loader:1416:10) at Module.load (node:internal/modules/cjs/loader:1208:32) at Module._load (node:internal/modules/cjs/loader:1024:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12) at node:internal/main/run_main_module:28:49

Node.js v20.13.1 This happens with the original code too.

Venus5687 commented 5 months ago

(Note: Discord.js is already installed and I also modified the other files with my bot's things)