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

133
Views
¿Cómo puedo verificar si alguien está respondiendo un mensaje de alguien específico?

Estoy usando Discord.js v13

Mi objetivo está en un evento de mensaje, como este:

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

para verificar si alguien, sin importar quién, está respondiendo a algún mensaje de una persona específica

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

0

Usando el campo de reference , puede saber si el mensaje es una respuesta. Por ejemplo

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

Tenga en cuenta que el mensaje de referencia debe almacenarse en caché. Si no está en caché, puede usar 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!