class Welcome (commands.Cog, name="join"):
def __init__(self, bot):
self.bot = bot
@commands.Cog.listener()
async def on_member_join(self, member: discord.Member):
role = discord.utils.get(member.guild.roles, name='Server Tag')
channel = self.bot.get_channel(801949269165998080)
embed = discord.Embed(description=f'Hi {member.mention}, Welcome to the server', color=0x0bf9f9)
await member.add_roles(role)
await channel.send(embed=embed)
当成员加入服务器时,机器人不会回复消息。可能是什么问题`?