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

206
Vistas
Cannot read properties of undefined (reading 'fetch') on guild.members.fetch()

I am working on setting a script that will cycle thorough all the members in a guild without using the cache system. I am getting an issue where when I use guild.members.fetch() it treats guild.members as undefined. I know it isn't because I am currently logging guild.members and it is giving me a GuildMemberManager object. I don't understand when once I use fetch() on it, it is suddenly being viewed as undefined. Here is a screenshot of the entire error message

function addMissingJsons(message, bot) {
    bot.guilds.fetch("id").then(guild => {
        console.log(guild.members);
        guild.memebers.fetch().then(members => {
            console.log(members);
        });
    });
}
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

As @mswgen said, you have a typo. It should be guild.members not guild.memebers. Your code should look like this:

function addMissingJsons(message, bot) {
    bot.guilds.fetch("id").then(guild => {
        console.log(guild.members);
        guild.members.fetch().then(members => {
            console.log(members);
        });
    });
}


Since the comment worked, this is just a response for you to mark as the best answer to close the thread.

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