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

262
Vistas
discord.js v13 Cannot send a message to all the members in the same vc (except bots and the host)

I am trying to make a similar game as the known game Mafia/werewolf and I only need the bot to send a specific text (mafia) to a specific number of users in the VC and the rest I want them to get the same message (good). However, I don't want the (killers) to receive the (good) message again.

client.on("message", (msg) => {
    if (msg.content.startsWith(prefix + "Game")) {
        if (!msg.channel.guild) return;

        let channel = msg.member.voiceChannel;

        let toCheck = channel.members;
        let random1 = toCheck.random();
        let randomE = toCheck.random();

        random1.send("killer");
        msg.channel.send(`${random1} killer`);

        randomE.send("good");
        msg.channel.send(`${randomE} good`);
    }
});
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