const Discord = require('discord.js');
const client = new Discord.Client();
client.once('ready', () => {
console.log('Bot is online!');
});
client.login('token');
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('token');
C:\Users\user\Desktop\dis\2\my-discord-bot\node_modules\discord.js\src\client\Client.js:512
throw new DiscordjsTypeError(ErrorCodes.ClientMissingIntents);
^
const Discord = require('discord.js');
const client = new Discord.Client();
client.once('ready', () => {
console.log('Bot is online!');
});
client.login('token');
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('token');
C:\Users\user\Desktop\dis\2\my-discord-bot\node_modules\discord.js\src\client\Client.js:512
throw new DiscordjsTypeError(ErrorCodes.ClientMissingIntents);
^