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

455
Views
Please help, does not output embed when a new user appears on the server. discord.js

Why does this not work? According to the idea, it should output an embed with a greeting and give the role of "traveler" when a new user on server, but something goes wrong, either an error in the embed or in my bad code.

robot.on('guildMemberAdd', member => {
  const userId = member.id;
  const exampleeEmbedd = new MessageEmbed()
  .setColor('#53db56')
  .setTitle('  [👋] Приветствуем нового путника!')
  .setDescription(' Приветствуем вас <@!'+ userId +'>!\nДобро пожаловать на международный сервер режима Geopolitics. \nЗдесь вы можете присоеденится к существующему городу/государству, либо зарегистрировать свой город/государство.')
  .setURL('')
  .setAuthor('👑Имперский Бот👑', 'https://images-ext-2.discordapp.net/external/nWASMV-67mx7guRheeUpvyD_cb6X2NkxUMH4PtbweyA/%3Fsize%3D512/https/cdn.discordapp.com/avatars/916617120064884796/5028d4861b407575072686657b3c2e9a.png' )
  .setThumbnail(member.user.avatarURL())
  .addFields(
  )
  .setImage('')
  .setTimestamp()
  .setFooter('Всего пользователей: ' +  member.guild.memberCount, 'https://images-ext-2.discordapp.net/external/nWASMV-67mx7guRheeUpvyD_cb6X2NkxUMH4PtbweyA/%3Fsize%3D512/https/cdn.discordapp.com/avatars/916617120064884796/5028d4861b407575072686657b3c2e9a.png');
  const role = member.guild.roles.cache.get("921840233883009084")
  member.roles.add(role); 
  var msg = member.guild.channels.get('921833742585188353').
  msg.send( { embeds: [exampleeEmbedd] } ); 
});
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Your issue most likely lies in that you do not have proper intents for guild member events. In your developer portal under your bot enable the server members intent.

When instantiating your client be sure to add the GUILD_MEMBERS intent in your intents.

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!