Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

265
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!