Discord.js: Name to User ID

Created on 25 Aug 2016  路  3Comments  路  Source: discordjs/discord.js

How can I get a user id by their name?

question (please use Discord instead)

Most helpful comment

Bruh

All 3 comments

client.users.get('name', 'name here').id

p.s. read the docs
p.s. learn javascript

Bruh

It depends where you're at. If you have access to a message, the best would be
message.server.members.get("name", "USERNAMEHERE").id;
otherwise you can also get it globally
client.users.get("name", "USERNAMEHERE").id;

Was this page helpful?
0 / 5 - 0 ratings

Related issues

BrandonCookeDev picture BrandonCookeDev  路  3Comments

Lombra picture Lombra  路  3Comments

Blumlaut picture Blumlaut  路  3Comments

Alipoodle picture Alipoodle  路  3Comments

xCuzImPro picture xCuzImPro  路  3Comments