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

272
Vistas
How do you make a Discord bot send an emoji when you give it the name of the emoji?

I'm trying to make my Discord bot send an emoji when I tell it the name. E.g., say I send !emoji hello, I want the bot to send back the emoji called hello.

If I send an emoji the bot will send it back but I'm not sure how to grab an emoji from its name being sent to the bot.

I use discord.js v12 for reference.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You could try something like this

bot.on("messageCreate", (message) => {
    const exampleEmoji = message.guild.emojis.cache.find(emoji => emoji.name === message.content);
    channel.message.send(`Is this the emoji you want? ${exampleEmoji}`);
});

You can then nest it inside of your if statement as you please with whatever command you are using. This also should be v12/v13 compatible and I believe the only differences with older versions is whether you add cache or not to the find function.

You can also use the same function to find the emoji as a boolean to determine if the emoji exists or not and if not send a different message for feedback.

I also found this really interesting function which helped me when deciphering which emojis I have and which are not in the scope I am presenting.

if (message.content === "listemojis") {
   const emojiList = message.guild.emojis.cache.map((e, x) => `${x} = ${e} | ${e.name}`).join("\n");
   message.channel.send(emojiList);
}

Which will output this for every emoji within the scope you searched.

450661466287112204 = :image: | name

Which I found here. Hope this helps

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