我想制作一个机器人,当成员对消息做出反应时,它会为成员添加角色。
@client.event
async def on_raw_reaction_add(reaction, member: discord.Member):
ChID = '678640775747076097'
if reaction.message != ChID:
await member.send("Nope")
return
else:
if member.reaction.emoji == ":white_check_mark:":
Role = discord.utils.get(member.server.roles, id="672473925053055036")
await client.add_roles(member, Role)
await user.send("Success")
当我回复消息时,出现以下错误:
TypeError: on_raw_reaction_add() missing 1 required positional argument: 'member'
一只萌萌小番薯
相关分类