Help on a node discord bot error

Question:

const { Client, Intents, Collection } = require('discord.js')
const fs = require('fs');

const client = new Client({ intents: Object.keys(Intents.FLAGS) });
client.commands = new Collection()
client.config = require('./config.json')
client.cooldown = {}
const events = fs
  .readdirSync('./events')
  .filter(file => file.endsWith('.js'))

events.forEach(event => {
  const eventFile = require(`./events/${event}`)
  if (eventFile.oneTime) {
    client.once(eventFile.event, (...args) => eventFile.run(client, ...args))
  } else {
    client.on(eventFile.event, (...args) => eventFile.run(client, ...args))
  }
})

client.login(client.config.token)

that is my code and the error is below if anyone can help!

const client = new Client({ intents: Object.keys(Intents.FLAGS) });
                                                         ^
TypeError: Cannot read properties of undefined (reading 'FLAGS')
    at Object.<anonymous> (/home/container/index.js:4:58)
    at Module._compile (node:internal/modules/cjs/loader:1356:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
    at Module.load (node:internal/modules/cjs/loader:1197:32)
    at Module._load (node:internal/modules/cjs/loader:1013:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:128:12)
    at node:internal/main/run_main_module:28:49

Question:

ERROR


TypeError: MessageEmbed is not a constructor
    at Object.run (C:\Users\bptan\Downloads\Generator Bot\commands\addType.js:21:33)
    at Object.run (C:\Users\bptan\Downloads\Generator Bot\events\interactionCreate.js:9:28)
    at Client.<anonymous> (C:\Users\bptan\Downloads\Generator Bot\index.js:17:55)
    at Client.emit (node:events:513:28)
    at InteractionCreateAction.handle (C:\Users\bptan\Downloads\Generator Bot\node_modules\discord.js\src\client\actions\InteractionCreate.js:97:12)
    at Object.module.exports [as INTERACTION_CREATE] (C:\Users\bptan\Downloads\Generator Bot\node_modules\discord.js\src\client\websocket\handlers\INTERACTION_CREATE.js:4:36)
    at WebSocketManager.handlePacket (C:\Users\bptan\Downloads\Generator Bot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:355:31)
    at WebSocketManager.<anonymous> (C:\Users\bptan\Downloads\Generator Bot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:239:12)
    at WebSocketManager.emit (C:\Users\bptan\Downloads\Generator Bot\node_modules\@vladfrangu\async_event_emitter\dist\index.cjs:282:31)
    at WebSocketShard.<anonymous> (C:\Users\bptan\Downloads\Generator Bot\node_modules\@discordjs\ws\dist\index.js:1173:51)
Emitted 'error' event on Client instance at:
    at emitUnhandledRejectionOrErr (node:events:394:10)
    at processTicksAndRejections (node:internal/process/task_queues:85:21)

Hi @GGFilms!
Could you please provide the link to the repl?