it keeps giving me an error every time I run it and it's always a different error after I change the code
This is my method that I found, Im coding this in the latest version of node.js and discord.js
const { Client, Intents } = require('discord.js');
const fs = require('fs');
// Create a new client
const client = new Client({
intents: new Intents(Intents.ALL),
});
My error for this is TypeError: Cannot read properties of undefined (reading 'ALL')
I tried this too
const client = new Client({
intents: new Intents([
'GUILDS',
'GUILD_MESSAGES',
'MESSAGE_CONTENT',
'GUILD_MEMBERS',
]),
});
And still it gives me an error TypeError: Intents is not a constructor
I don't know any other way to fix, this can someone help me?