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

155
Views
Discord JS: ¿Cómo muevo a todos los miembros dentro de una matriz a un canal?

Quiero mover todos los miembros dentro de una matriz a un canal. La matriz de memberIDs de miembro contiene los ID del miembro que quiero mover. La variable gameChannel contiene la identificación del canal como una cadena. Mi código se ve así:

 memberIDs.forEach(element => message.guild.member(element).voice.setChannel(gameChannel));
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Para mover un miembro, primero debe obtener sus datos (GuildMember) y luego moverlo.

Discordia.js^12

 var gameChannel = 'CHANNEL_ID'; var memberIDs = ['SOME_ID_HERE', 'OTHER_ID_HERE', '...']; // For each element of the 'MemberIDs' memberIDs.forEach(id => { // Assuming 'guild' is the Server Guild var member = guild.member.cache.get(id); // Get member if(member){ // Move member.voice.setChannel(gameChannel, 'reason (this can be empty)') .then(e => console.log('User moved successfully')) .catch(e => console.log('An error occurred while trying to move the user')); } });
about 4 years ago · Juan Pablo Isaza Report
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!