【发布时间】:2021-08-11 13:32:57
【问题描述】:
async def on_message(message):
if message.content.startswith("-test"):
await message.channel.send("Checking for the Status :pencil:..")
time.sleep(1)
async def on_member_update(before, after):
if str("discord.gg / discord") in member.activities[0].name():
print("Correct Status giving role to User")
guild = client.get_guild(8516587165187561)
role = discord.utils.get(guild.roles, id=9157981598717517571)
await message.channel.send("roled")
我尝试获取用户状态,如果他指定了该状态,他将获得角色,我不知道为什么它不起作用,我使用 discord.py
【问题讨论】:
-
有人可以帮忙吗
标签: discord