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

147
Views
How can I check if someone is replying to a message from someone specific

I am using Discord.js v13

My goal is in a message event, like this:

client.on('messageCreate', async message => {
   //Code comes here
})

to check if anyone, no matter who, is replying to any message from a specific person

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

0

Using the reference field, you can get whether the message is a reply. For example

client.on('messageCreate', async message => {
   if (message.reference.messageId) { // the message is a reply to another message
        let referenceMessage = message.channel.messages.cache.get(message.reference.messageId);
        if (referenceMessage.author.id == MY_USER_SNOWFLAKE) {
            // The reply was to the specific user!
        }
   }
})

Keep in mind that the reference message must be cached. If it isn't cached, you can use message.fetchReference().

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!