Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

164
Vistas
Discord.js ban duration

I have been struggling with this issue for quite some time

I wanna see what options I have for a ban duration. However

the official discord documentation is barebones on this subject

guildMember.ban({ days: 7, reason: 'They deserved it' })
  .then(console.log)
  .catch(console.error);

This code bans a guildmember for 7 days

But aside from days are there minutes ? Hours ? Etc ?

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

It doesn't ban the member for 7 days. It just deletes 7 days of their messages. To actually ban them for ? days, ? minutes, ? hours, etc., you need to set a timer yourself (e.g. setTimeout, although the timer will be reset when you restart the bot).

about 4 years ago · Juan Pablo Isaza Denunciar

0

Days is not the duration. Days specifies the days to delete messages in. Its like when you try to ban someone on discord, it gives you the option to select for how long you want to delete past messages. To implement a temp ban, you have to manually write code that unbans them.

Reference: https://discord.js.org/#/docs/main/stable/typedef/BanOptions

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda