When I run node . I keep getting the error “ReferenceError: Cannot access ‘client’ before initialization”
my script is…
const { Client, Intents } = require(“discord.js”)
const client = new Client({
Intents:[
Intents.FLAGS.GUILDS,
Intents.FLAGS.GUILD_MEMBERS,
Intents.FLAGS.GUILD_MESSAGES
]
})
const config = require("./config.js")
client.login(config.TOKEN)
client.on(“ready”, async () => {
console.log(“Im Login!”)
client.user.setactivity(“Hello World!”)
})