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

128
Views
discord.js v13 comprueba si el miembro está en un servidor

Quiero comprobar si un miembro está o no en un servidor.
Este es mi código actual:

 function CheckIfManagerIsInServer(client, server_id, member) { let isIn = { isIn: true, isNotIn: [] }; if (CheckIfIsInChain(server_id)) { database.chains.forEach(chain => { if(chain.membersID.includes(server_id)) { chain.members.forEach(server => { const guild = client.guilds.cache.get(server) // check if member is in the server }) } }) } return isIn; }

El parámetro de member es la identificación del miembro.
¿Cómo puedo verificar si el miembro está o no en el servidor ( guild )? Estoy usando v13.5.0.
Mi bot está verificado y tiene habilitado GUILD_MEMBERS .
He probado varios métodos pero no funciona.
¿Como puedo hacer?
¡Gracias de antemano y perdón por el mal inglés!

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Por comprobar que se puede hacer así

 if (guild.members.cache.find(m => m.id === member)?.id) { // true } else { // false }
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!