【发布时间】:2021-03-28 06:56:20
【问题描述】:
所以,我正在为我所在的服务器制作一个机器人,并尝试在成员加入时添加欢迎消息。到目前为止,它一直没有工作,也没有给出错误。有什么问题吗?
async def on_member_join(member):
print("working") #I have this here to check to see if its being called, but no message is printed.
rules = client.get_channel(772263419210235916)
verify = client.get_channel(772995392521895937)
channel = client.get_channel(772583213797212211)
embed=discord.Embed(title="Welcome to Delight Stuidos!",
description=f"""{member.mention} has joined! \nDon't forget to read the {rules.mention}, and react with the purple star in {verify.mention}!
Enjoy your stay ^^""",
color = discord.Colour.orange())
embed.set_thumbnail(url=f"https://i.ibb.co/NC2Wgnk/DS.png")
await channel.send(embed=embed)
也启用了意图,所以我不知道发生了什么。
【问题讨论】:
-
您是否启用了
intents.members? -
是的,我启用了它们
标签: python discord discord.py