Finding a user by their username#discrim

孤者浪人 提交于 2020-01-15 10:25:06

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/49848063/finding-a-user-by-their-usernamediscrim

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!