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

258
Views
Discordia.js v12 | Eliminar invitaciones del servidor

Quisiera que mi bot eliminara las invitaciones creadas en mi servidor con un comando. Sé que puedo tomar todas las invitaciones con message.guild.fetchInvites().then() , pero ¿cómo hago que mi lambda elimine todas las invitaciones? Gracias de antemano y disculpe si es una pregunta tonta!

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

0

Comenzaste bien, pero aquí te explicamos cómo recorrerlos todos y eliminarlos uno por uno:

 message.guild.invites.fetch().then(invites => { invites.each(i => i.delete()) })

Advertencia: si hay muchas invitaciones, es posible que tenga una tarifa limitada. Puede agregar una función de "reposo" para arreglar esto

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!