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

172
Views
El bot de bienvenida de Discord.js recibe el nombre de los usuarios como 'indefinido'

Estoy tratando de hacer un bot de bienvenida, todo funciona, pero por alguna razón, el nombre del usuario que se unió no está undefined . Aquí está el código:

 client.on('guildMemberAdd', (joinMember) => { const joinChannel = client.channels.cache.find(channel => channel.id === '931712815637602331') let joinEmbed = { title : `Welcome to ${joinMember.guild.name}, @${joinMember.tag}`, color : embedColor } joinChannel.send({embeds : [joinEmbed]}) })
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

joinMember es un GuildMember y no tiene una propiedad de tag . Sin embargo, tiene una propiedad de user y los User tienen tag , por lo que puede usar joinMember.user.tag :

 client.on('guildMemberAdd', (joinMember) => { const joinChannel = client.channels.cache.get('931712815637602331'); let joinEmbed = { title: `Welcome to ${joinMember.guild.name}, @${joinMember.user.tag}`, color: embedColor, }; joinChannel.send({ embeds: [joinEmbed] }); });
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!