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

198
Views
No se pueden leer las propiedades de undefined (leyendo 'comparePositionTo'

Estoy haciendo un kick slashCommand en discord.js v13 y estaba tratando de comparar los roles de usuario y el rol de destino, pero no funciona, no sé por qué.

aquí está mi código:

 If(interaction.member.highest.comparePositionTo(target.roles.highest.position > 0)) { const kickErr = new MessageEmbed() .setDescription(`You cannt kick this member because their role is higher/equal to yours.`) .setColor(ee.color) return interaction.reply({ embeds: [kickErr] }) } else if (interaction.guild.me.roles.highest.comparePositionTo(target.roles.highest.position > 0)) { const kickErr2 = new MessageEmbed() .setDescription(`I cannot kick this member because their role is higher/equal to mine.`) .setColor(ee.color) return interaction.reply({ embeds: [kickErr2] }) }
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Parece que tienes este error porque en la primera línea de tu código usaste

 if(interaction.member.highest.comparePositionTo(targ...

En vez de

 if(interaction.member.roles.highest.comparePositionTo(targ...

Además, la próxima vez que publique una pregunta en stackoverflow, asegúrese de agregar la pila de errores completa en su publicación para que sea más fácil de entender.

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!