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); });