Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

128
Vistas
node.js discord bot wont ready

I've recently gotten interested in discord bots so I started coding one however now about a day in everything stopped working kick, ban, clear everything I coded isn't working the discord bot won't ready theirs no response in the terminal once so even if I try to run it here's my code

const mySecret = process.env[`TOKEN`]
const Discord = require("discord.js");
const prefix = '!';
const fs = require('fs');
const client = new Discord.Client({ intents: ["GUILDS", "GUILD_MESSAGES", "GUILD_MEMBERS"], partials: ["MESSAGE", "CHANNEL", "REACTION"] });

client.commands = new Discord.Collection();

const commandFiles = fs.readdirSync('./commands/').filter(file => file.endsWith('.js'));
for (const file of commandFiles) {
  const command = require(`./commands/${file}`);

  client.commands.set(command.name, command);

}

const welcome = require("./welcome");

client.on('ready', () => {
  console.log("Our Discord bot is online");

  welcome(client);
});

client.on('message', message => {

  if (!message.content.startsWith(prefix) || message.author.bot) return;
  const args = message.content.slice(prefix.length).split(/ +/);
  const command = args.shift().toLowerCase();

  if (command === 'clear') {
    client.commands.get('clear').execute(message, args);
  } else if (command === 'kick') {
    client.commands.get('kick').execute(message, args);
  } else if (command === 'ban') {
    client.commands.get('ban').execute(message, args);
  } else if (command === 'mute') {
    client.commands.get('mute').execute(message, args);
  } else if (command === 'unmute') {
    client.commands.get('unmute').execute(message, args);
  }
});

client.on("message", msg => {
  if (msg.content === "i love snick") {
    msg.reply("Me too!");
  }
})


client.login(process.env.TOKEN);
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda