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

196
Views
¿Cómo ignorar este error? Como en detenerlo de enviar

Creé una función en mi bot de Discord para reaccionar a los emojis con el mismo emoji, pero cuando alguien envía un mensaje que no es un emoji, envía este error (no detiene el bot, solo me molesta e inunda la consola)

Aquí está:

 client.on("message", message => { try { message.react(message.content); } catch (err) { console.log('') } });

Intenté buscar una forma de comprobar si el mensaje es un emoji o no antes de ejecutar message.react(message.content); .

Pero no encontré un resultado.

Y aquí está el error: UnhandledPromiseRejectionWarning: DiscordAPIError: Unknown Emoji

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

0

Para ignorar un error, puede agregar .catch((err) => {}) a su código, por ejemplo:

 message.react("").catch((err) => {})
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!