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

190
Vistas
discord.js How to ban someone when they join if they match a specific ID

I am trying to check to see if a user is a specific user when they join my discord server and then ban them if they are. I am pretty new to this and this code is not working. any help?

client.on("guildMemberAdd", (member) => {
    if (member.id === "401539231828148224") {
        member.ban;
    }
});
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

GuildMember#ban is a method, not a property. You'll have to use parentheses. (())

client.on("guildMemberAdd", (member) => {
    if (member.id === "401539231828148224") {
        member.ban({ reason: "Reason for the ban." });
    }
});

Note that you need to activate the Server Members Intent in your application's Bot tab.

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