Cześc, mam problem, przy próbie włączenia bota przez komende node index.js mam taki błąd: TypeError [CLIENT_MISSING_INTENTS]: Valid intents must be provided for the Client.
Jak naprawic? kod:
const botconfig = require("./botconfig.json");
const Discord = require("discord.js");
const prefix = "!";
const nazwabota = "BotJaszczura";
const bot = new Discord.Client({ disableEveryone: true });
bot.on("ready", async () => {
console.log(`${nazwabota} jest online`);
});
bot.on("message", async (message) => {
if (message.author.bot) {
return 0;
}
const commandBody = message.content.slice(prefix.length).trim();
const args = commandBody.split(/ +/);
const commandName = args.shift().toLowerCase();
switch (commandName) {
case "help":
message.channel.send({
embed: {
title: `Pomoc`,
color: "#ff00f4",
description: `Mój prefix to **!**
Komendy: ,,!Napisz'' bot powtarza za tobą twoją wiadomość`,
},
});
break;
case "napisz": message.delete();
message.channel.send(message.content.slice(prefix.length + 6));
break;
}
});
bot.login(botconfig.token)