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

144
Views
¿Cómo rastrear quién invitó a un bot con discord.js?

¿Cómo rastrear quién invitó a un bot de Discord en un gremio, usando discord.js? Quiero crear un evento anti-bot y tomar medidas contra el invitador.

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

0

El uso de registros de auditoría será suficiente (deberá otorgar permisos al bot). Usando GuildAuditLogsEntry.executor y GuildAuditLogsEntry.target . Aquí hay una implementación (verificará si el miembro es un bot y, si lo es, hará algo de su elección)

 client.on("guildMemberAdd", async (member) => { if (!member.user.bot) return; const auditLogs = await member.guild.fetchAuditLogs({type: "BOT_ADD"}) const auditLog = auditLogs.entries.first() //you can take ban with "auditLog.executor.ban()" //you can also ban the bot with "auditLog.target.ban" })

Probado en discord.js v13

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!