help bot doesn't respond to messageCreate

so I have all intents turned on inside dev portal I dm it !ticket and the bot remains silent and the console remains empty any ideas why???

code:
import express from 'express'
const app = express();
const port = 3000
import path from "path"
const file = "main.html"
import { REST, Routes } from 'discord.js';
import bodyParser from 'body-parser'
import { readFileSync } from "fs"
import Discord from "discord.js"
import { GatewayIntentBits, Client, Collection } from 'discord.js';
import Database from "@replit/database"
const db = new Database()
//await db.set("verification codes",JSON.stringify({}))
const client = new Client({

  intents: [
    GatewayIntentBits.Guilds,
    GatewayIntentBits.GuildMessages,
    GatewayIntentBits.MessageContent,
    GatewayIntentBits.GuildMembers,
    GatewayIntentBits.GuildPresences,
    GatewayIntentBits.DirectMessages
  ],
});


app.get('/', (req, res) => {
  res.sendFile(path.resolve(file))
})

app.listen(port, () =>
  console.log(`connected to port:${port}`)
);




import { readdirSync } from "fs"
const commands = []
import { fileURLToPath } from 'url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
client.slashcommands = new Collection();
const foldersPath = path.join(__dirname, 'commands');
const commandFiles = readdirSync(foldersPath).filter(file => file.endsWith('.mjs'));



for (const file of commandFiles) {
  const filePath = path.join(foldersPath, file);
  const { command } = await import(`${filePath}`);
  if ('data' in command && 'run' in command) {
    commands.push(command.data.toJSON())
    client.slashcommands.set(command.data.name, command);
  } else {
    console.log(`[WARNING] The command at ${filePath} is missing a required "data" or "run" property.`);
  }
}


const rest = new REST().setToken(process.env.TOKEN);
Was this page helpful?