简体   繁体   中英

Finding a user by their username#discrim

Is it possible to get someone's user ID who you know their username and discrim, but is not in a mutual server with you?

Thanks.

I don't think so. It makes sense since this can easily be abused. Imagine all the spam bots if bots can see all discord users.

Below are two ways to get user info using discord.py , but note that they cannot be used as you ask.

client.get_user_info can be used to get user info even if you don't share a server, but it takes the unique ID as an argument.

server.get_member_named returns the unique user ID and takes username plus the optional discriminator as input, but requires that you share server/guild with the user to work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM