Discord.js command not working

i am using relpit, it doesn’t say any errors, it runs the bot just fine but when i try to trigger the command in chat nothing happens, when i try the slash triggers it sends out a message like so:

const Discord = require('discord.js');
const client = new Discord.Client({intents: 3276799});
const prefix = 'T:';

client.once('ready', () => {
  console.log('Therapy4You Is In Session!');

client.on('message', (message) => {
  if (!message.content.startsWith(prefix) || message.author.bot) return;

  const args = message.content.slice(prefix.legnth).split(/ + /)
  const command = args.shift().toLowerCase()

  if(message.content.startsWith(prefix + "hello")){
const mySecret = process.env['DISCORD_BOT_SECRET']


I was having the same issue.

I was able to resolve by changing the following:

the client/intent line to →
const client = new discord.Client({ intents: ["Guilds", "GuildMessages","MessageContent"] });

its still not working :sweat_smile:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.