! 🎃 ᒪเ𝔫Ѷε𝓝𝓽ί𝔣 👽 !
! 🎃 ᒪเ𝔫Ѷε𝓝𝓽ί𝔣 👽 !
DIAdiscord.js - Imagine an app
Created by ! 🎃 ᒪเ𝔫Ѷε𝓝𝓽ί𝔣 👽 ! on 7/11/2024 in #djs-questions
Unable to catch the disalowed intent
I constantly fail to catch the missing intents. How can I catch this error?
const client = new Client({
intents: [
IntentsBitField.Flags.Guilds,
IntentsBitField.Flags.GuildMessages,
IntentsBitField.Flags.GuildMembers,
IntentsBitField.Flags.MessageContent,
],
partials: [Partials.Channel],
});

client.on('ready', () => {
console.log(`Ready: ${client.user.tag}`);
});

client.on('warn', (msg) => {
console.warn(`Warn: ${msg}`);
});

client.on('error', (msg) => {
console.error(`Error: ${msg}`);
}); //

await client
.login(token)
.catch((error) => {
console.error('Error logging in:', error);
});
const client = new Client({
intents: [
IntentsBitField.Flags.Guilds,
IntentsBitField.Flags.GuildMessages,
IntentsBitField.Flags.GuildMembers,
IntentsBitField.Flags.MessageContent,
],
partials: [Partials.Channel],
});

client.on('ready', () => {
console.log(`Ready: ${client.user.tag}`);
});

client.on('warn', (msg) => {
console.warn(`Warn: ${msg}`);
});

client.on('error', (msg) => {
console.error(`Error: ${msg}`);
}); //

await client
.login(token)
.catch((error) => {
console.error('Error logging in:', error);
});
25 replies