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

323
Views
¿Cómo puedo encontrar quién eliminó el rol en "roleDeltete" en discord.js?

Estoy en v13 de discord.js y cuando ejecuto este client.on('roleDelete', a => { console.log(a); }); solo registra deleted: true no muestra quién eliminó. ¿Alguien puede ayudarme sobre cómo puedo encontrar quién eliminó el rol en el evento "roleDelete"?

ingrese la descripción de la imagen aquí

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

0

Utilice registros de auditoría. Sin embargo, el bot necesitará permisos:

 client.on("roleDelete", async role => { let member; try { const log = await role.guild.fetchAuditLogs({ type: "ROLE_DELETE" }) member = role.guild.members.resolve(log.entries.first().executor) } catch (err) { console.log(err) // simply for debugging } if (!member) member = null })

Y ahora, cuando acceda al member , se mostrará null si no pudo encontrar al ejecutor, pero mostrará el GuildMember que eliminó el rol si se encontró.

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!