I have fixed this with this new index:
const { EmbedBuilder, Client, GatewayIntentBits, Partials, Collection } = require('discord.js');
const { token } = require("./config.json")
const client = new Client({
intents: [
GatewayIntentBits.GuildScheduledEvents,
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.GuildPresences,
GatewayIntentBits.GuildMessageReactions,
GatewayIntentBits.AutoModerationConfiguration,
GatewayIntentBits.AutoModerationExecution,
GatewayIntentBits.DirectMessages,
GatewayIntentBits.MessageContent,
GatewayIntentBits.GuildMembers
],
partials: [Partials.Channel, Partials.Message, Partials.User, Partials.GuildMember, Partials.Reaction]
});
const fs = require('fs');
const config = require('./config.json');
client.commands = new Collection()
client.aliases = new Collection()
client.slashCommands = new Collection();
client.buttons = new Collection();
client.modals = new Collection();
client.selectMenus = new Collection();
client.prefix = config.prefix;
module.exports = client;
fs.readdirSync('./Ge747-Bot/handlers').forEach((handler) => {
require(`./Ge747-Bot/handlers/${handler}`)(client)
});
client.login(token)```
but I get this new error