简体   繁体   English

通过用户名#discrim查找用户

[英]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? 是否可以获取您知道其用户名和身份但与您不在共同服务器中的某人的用户ID?

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. 以下是使用discord.py获取用户信息的两种方法,但请注意,不能按要求使用它们。

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. 即使您不共享服务器,也可以使用client.get_user_info获取用户信息,但是它将唯一ID作为参数。

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. server.get_member_named返回唯一的用户ID,并将用户名和可选的鉴别server.get_member_named作为输入,但是要求您与该用户共享服务器/行会才能工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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