C:\Program Files\nodejs\node.exe .\my-discord-bot\index.js
Uncaught TypeError TypeError: Cannot read properties of undefined (reading 'FLAGS')
at <anonymous> (c:\Users\user\Desktop\dis\2\my-discord-bot\index.js:6:17)
at Module._compile (internal/modules/cjs/loader:1358:14)
at Module._extensions..js (internal/modules/cjs/loader:1416:10)
at Module.load (internal/modules/cjs/loader:1208:32)
at Module._load (internal/modules/cjs/loader:1024:12)
at executeUserEntryPoint (internal/modules/run_main:174:12)
at <anonymous> (internal/main/run_main_module:28:49)
Process exited with code 1C:\Program Files\nodejs\node.exe .\my-discord-bot\index.js
Uncaught TypeError TypeError: Cannot read properties of undefined (reading 'FLAGS')
at <anonymous> (c:\Users\user\Desktop\dis\2\my-discord-bot\index.js:6:17)
at Module._compile (internal/modules/cjs/loader:1358:14)
at Module._extensions..js (internal/modules/cjs/loader:1416:10)
at Module.load (internal/modules/cjs/loader:1208:32)
at Module._load (internal/modules/cjs/loader:1024:12)
at executeUserEntryPoint (internal/modules/run_main:174:12)
at <anonymous> (internal/main/run_main_module:28:49)
Process exited with code 1 const Discord = require('discord.js');
const { Client, Intents } = require('discord.js');
const client = new Client({
intents: [
Intents.FLAGS.GUILDS, // חובה לצרכי הבסיסיים של הבוט
Intents.FLAGS.GUILD_MESSAGES // רק אם הבוט צריך לקרוא ולכתוב הודעות
]
});
client.once('ready', () => {
console.log('Bot is online!');
});
client.login('t
'); const Discord = require('discord.js');
const { Client, Intents } = require('discord.js');
const client = new Client({
intents: [
Intents.FLAGS.GUILDS, // חובה לצרכי הבסיסיים של הבוט
Intents.FLAGS.GUILD_MESSAGES // רק אם הבוט צריך לקרוא ולכתוב הודעות
]
});
client.once('ready', () => {
console.log('Bot is online!');
});
client.login('t
'); 