简体   繁体   English

如何获取刚加入服务器的会员ID?

[英]How can I get the ID of the member who just joined the server?

How can I get the ID of the member who just joined the server?如何获取刚加入服务器的会员ID? Like, member just joined my server and I need to get his ID.比如,会员刚刚加入我的服务器,我需要获取他的 ID。 How I can do this?我怎么能做到这一点?

member.id doesn't work, as this gives: member.id 不起作用,因为这给出了:

AttributeError: 'CachedSlotProperty' object has no attribute 'id' AttributeError: 'CachedSlotProperty' object 没有属性 'id'

Your error not in member.id .您的错误不在member.id中。 It's in str((discord.Message).guild.id) .它在str((discord.Message).guild.id)中。 What were you trying to do with this?你想用这个做什么? If you need to get ID of guild of member use member.guild.id .如果您需要获取成员公会的 ID,请使用member.guild.id

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

相关问题 discord.py如何获取刚加入vc的成员的id - discord.py how to get id of an member that just joined the vc Python Discord - 如何获取特定服务器中成员的初始加入日期? - Python Discord - How to get the initial joined date for a member in a specific server? 如何在 on_member_join 中获取当前公会 ID - how can I get current guild ID in on_member_join discord.py 会员在 discord 注册并加入服务器时如何获取信息 - discord.py how to get info when member registered on discord, and joined server 如何从他们的用户ID中获得不和谐服务器成员的用户名 - How do I get the username of a member of a discord server from their user id discord py 如何为具有 id 的服务器成员用户提供角色 - discord py how can i give a role to server member user with id 如何获取我刚刚查询并使用的 sqlite 表的行的 blog_id? (在 Python 文件中) - How can I get the blog_id of the rows of the sqlite table I just query and used? (In a Python file) 如何从discord.py中的user_id获取成员对象 - How can I get an member object from the user_id in discord.py 如何阻止在 pycord 的服务器中没有权限的命令? - How can I block command who has no permission in server at pycord? Discord.py:如何获取触发 on_member_update 的用户名? - Discord.py: How do I get the name of the user who triggers on_member_update?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM