const Discord = require("discord.js");
const client = new Discord.Client({ ws: { intents: new Discord.Intents(Discord.Intents.ALL) } });
this is a code that requires all intents is it wrong
client.once('ready', () => {
console.log('Coleria is online!');
});
const prefix = '*'
can I go with this prefix
client.on("message", message =>{
if(!message.content.startsWith(prefix) || message.author.bot) return;
const args = message.content.slice(prefix.length).split(" ");
const command = args.shift().toLowerCase();
if(command === 'sa'){
messageCreate.channel.send('As kardeşim hoşgeldin.');
}
});
client.login("my token");
You shouldn't to use ws: { intents: new Discord.Intents(Discord.Intents.ALL)}
const client = new Discord.Client({
intents: [
Discord.Intents.FLAGS.GUILDS,
Discord.Intents.FLAGS.GUILD_MESSAGES
]
});
You should use this code because your bot is trying to find the GUILDS and GUILD_MESSAGES flags, and that's all you need to use.