Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

604
Vistas
How mention on discord.js

please help, how to mention the user in the message? I can't find the answer on the internet. my code:

  const exampleeEmbedd = new MessageEmbed()
  .setColor('#53db56')
  .setTitle('  [👋] Приветствуем нового путника!')
  .setDescription(' Приветствуем вас ' + /*MENTION*/ + '!\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(user.avatarURL())
  .addFields(
  )
  .setImage('')
  .setTimestamp()
  .setFooter('asdas', 'https://images-ext-2.discordapp.net/external/nWASMV-67mx7guRheeUpvyD_cb6X2NkxUMH4PtbweyA/%3Fsize%3D512/https/cdn.discordapp.com/avatars/916617120064884796/5028d4861b407575072686657b3c2e9a.png');
  mess.channel.send( { embeds: [exampleeEmbedd] } );
about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

Discord.js converts mentions for you automatically when interpreted as a string.

"Foo" + user + "Bar" converts to Foo<@!1234567890>Bar.

Using template strings:

`Foo${user}Bar`

In cases where you only have the user ID, you can do this manually:

"Foo<@!" + userId + ">Bar"
// or
`Foo<@!${userId}>Bar`

Ensure that userId is a string.

about 4 years ago · Juan Pablo Isaza Denunciar

0

You need to use a ${user} string or ${user.tag}, so your bot will mention a user.

Make sure you placed let user = message.mentions.members.first() above the embed

The example:

   const exampleeEmbed = new MessageEmbed()
  .setTitle('an embed')
  .setDescription(`Hello ${user}!`)
  mess.channel.send({ embeds: exampleeEmbed });

Also make sure you enclose your message as ``

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda