Discord.py从id / tag获取用户对象 [英] Discord.py get user object from id/tag
本文介绍了Discord.py从id / tag获取用户对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
所以我试图从ID或标签中获取用户对象,但是我使用的是用户帐户而不是Bot帐户,所以我不能使用 get_user_info()
是否存在对用户帐户执行此操作的任何方式?
So i'm trying to get a user object from an id or tag, however i am using a user account not a bot account so i cant use get_user_info() Is there any way to do this on an user account?
推荐答案
如果您知道用户ID,建议使用 bot.get_user(user_id)
代替。
If you know the user id, I suggest using bot.get_user(user_id)
instead.
这篇关于Discord.py从id / tag获取用户对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文