@commands.Cog.listener()
async def on_raw_reaction_add(self,payload):
if payload.member.bot:
pass
else:
with open('reactions.json') as f:
data = json.load(f)
for x in data:
if x['emoji'] == payload.emoji.name and x['message_id'] == payload.message_id:
role = discord.utils.get(payload.roles, id =x['role_id']) #как указать здесь вместо payload
await payload.member.add_roles(role)