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

271
Views
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 answers
Answer question

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 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!