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

228
Vistas
How to fix DiscordAPIError: Unknown Member?

I have had a discord bot running for about 3 months, and today I started getting this DiscordAPIError: Unknown Member error message. It is coming from an interaction:

  client.on("interactionCreate", async interaction => {
    interaction.member.roles.add(<roleId>);
  });

I am unable to consistently reproduce the error, but it seems like it may be coming from new members joining the server, and perhaps the discord API is not recognizing them as a guild member just yet. The server had a large influx of users today, and that's when the issue started.

Is there any way I can work around this issue, or perhaps force update the guild's member list?

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

0

The member does not seem to be properly cached. Before accessing it, use await interaction.member.fetch()

client.on("interactionCreate", async interaction => {
    await interaction.member.fetch()
    interaction.member.roles.add(roleId)
})
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