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

196
Vistas
Cannot read properties of undefined (reading 'users') | interaction.client.api.users | Discord.js V14

This Error: Console Error

TypeError: Cannot read properties of undefined (reading 'users')
    at Object.execute (D:\Mortal\Belgeler\Kod Denemeleri\Discord Botu\Via\v4 (v14)\commands\Kullanıcı\profil.js:34:55)
    at module.exports (D:\Mortal\Belgeler\Kod Denemeleri\Discord Botu\Via\v4 (v14)\events\interactionCreate.js:28:21)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

And this my code: Error

const APIFetch = await interaction.client.api.users(user ? user.id : interaction.user.id).get()

I could not find the solution to the problem on the internet because it is a new version. I researched for about 2 hours; At first, I looked at the sites and then looked at what data I could pull through interaction or the client. We can't pull API data. That's why we get the error "users" can't be read. At least that's it, as I understand it... How do I resolve this error?

about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Use interaction.client.users directly:

const data = await interaction.client.users.fetch(user ? user.id : interaction.user.id);
about 4 years ago · Santiago Trujillo 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