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

356
Views
¿Cómo contar la cantidad de reacciones en Discord.js v13?

He probado tantas cosas, aquí está mi código actual

 var green = toString(msg.reactions.cache.get('🟩').count); var red = toString(msg.reactions.cache.get('🟥').count); msg.reply("Poll has ended which was created by " + msg.author.username) msg.reply(green + " " + red)

da este error

 var green = toString(msg.reactions.cache.get('🟩').count); ^

TypeError: no se pueden leer las propiedades de undefined (leyendo 'recuento')

¡Por favor ayuda!

Quiero que muestre cuántas personas reaccionaron con 🟩 y 🟥.

No puedo hacer eso incluso después de preguntar a los expertos de Discord.js, no puedo entender cómo obtenerlos.

También quiero que sean una cadena, por eso utilicé la función The toString().

Esto es para un bot de encuesta/votación que estoy haciendo.

Reacciono a los mensajes y todavía muestra este error.

Esto es Discord.js v13.

¡Gracias!

elreydelladrón

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

0

let msg = await message.channel.messages.fetch("974311411314475059") let reactsSize = msg.reactions.cache.get("✅").count message.channel.send("✅ Reacts on that message is: " + (+reactsSize))

Primero debe esperar el mensaje, después de eso puede obtener reacciones.

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!