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

139
Views
A way to get the exact discord message content

If you type :a: or :gun:, it sends an emote in discord. What I'm trying to do, is if someone sends just the string that is in between those : (that is, in this case, I showed, 'a' or 'gun'), my bot would analyze it and check if it can be 'translated' to an emote.

I tried to do:

if (msg.content.length === 1)

But msg.content keeps on being :(string): so it doesn't work.

I am currently searching for other ways and will keep this updated. Any tips will be highly appreciated!

Edit: Went with this api as I found no other way

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

There are a couple caveats with this: 1) There does not appear to be anyway of checking against standard emojis; only guild (i.e. custom) emojis. 2) It may be possible with a 3rd-party plugin.

Regarding #1, this will translate a message into a GUILD emoji:

const emoji = message.guild.emojis.cache.find(e => e.name === message.content);
    
if (emoji) {
    message.channel.send(`<:${emoji.name}:${emoji.id}>`);
}

Regarding #2, check out emoji-regex. From what I can tell, convert the message to an emoji, and compare it to what emoji-regex tells you. If it matches, then you can send the emoji.

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!