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

188
Vistas
discord.js track invites for larger list

I found an answer on how to track invites here: How to make a invites command (Discord.js)

    client.on('message', message => {
        if(message.content === "-invite"){
            message.guild.fetchInvites().then(invites =>
                {
                    const userInvites = invites.array().filter(o => o.inviter.id === user.id);                
                    var userInviteCount = 0;
                    for(var i=0; i < userInvites.length; i++)
                    {
                        var invite = userInvites[i];
                        userInviteCount += invite['uses'];
                    }
                    message.reply(`You have ${userInviteCount} invites.`); 
                }
            )
        }
    });

But what worries me is that this solution could be used for a discord server with 50k members and could check invites every 1-5 seconds. Will the bot still work or will the list be too large or the requests too many? If the list is too large, is there any better method?

about 4 years ago · Juan Pablo Isaza
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