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

207
Views
Cómo quitar un rol de un usuario específico

Quiero eliminar un rol de un usuario específico, parece que no puedo hacerlo funcionar (estoy usando Discord.js v13)

 var role4 = msg.guild.roles.cache.find(role => role.name == "Role Name") client.users.fetch("321257540442652672").roles.remove(role4)
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

1) Los usuarios no tienen roles, los GuildMembers sí. Tienes que conseguir el objeto GuildMember

2) .fetch() devuelve una promesa, debe manejarla.

3) Asegúrese de recibir un objeto de rol válido.

 var role4 = msg.guild.roles.cache.find(role => role.name == "Role Name"); if (!role4) return console.error("No role found"); msg.guild.members.fetch("321257540442652672") .then(member => { member.roles.remove(role4); }) .catch(_ => console.log("No member found");
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!