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

517
Vistas
Discord JS v13 - Get internal user ID from a user tag in discord js v13

There have been similar questions but I havent been able to find an exact match so I apologize in advance.

I have am application form that someone fills out and provides their discord user tag (ex: Bob#1111). This form then gets sent to my discord (which that user has already joined). I then process it with my bot which creates a channel, copies the application to that channel and uses the discord user tag of the applicant to get their discord information and give them permissions on that newly created channel.

This worked for a few years prior to v13 but now its no longer working. Prior code was simply :

await guild.members.fetch()
let userID = client.users.cache.find(user => user.tag === userTag)    

Any thoughts would be greatly appreciated.

about 4 years ago · Santiago Gelvez
2 Respuestas
Responde la pregunta

0

Since you didn't explain what the actual issue is, I can only assume that the problem is when you try to give the user permissions for the channel.

Make sure to find the member in your server:

const member = await guild.members.cache.get(userID.id)

and then give the permissions for the found member.

about 4 years ago · Santiago Gelvez Denunciar

0

For what you're trying to do, I would recommend getting the member by their ID. You can do this by doing:

const member = guild.members.fetch('user-id')

For your code, userID will in fact give you the entire user class, not just the ID. You can access the user's ID by doing userID.id.

Additionally, you can view an example of how to set channel overwrites in discord.js guide.

about 4 years ago · Santiago Gelvez 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