fix (rroles): Don't assume member in event.

This commit is contained in:
2022-01-24 07:06:28 +02:00
parent 45d6fc9b54
commit cd62146e9a

View File

@@ -548,7 +548,7 @@ class ReactionRoleMessage:
@client.add_after_event('raw_reaction_add') @client.add_after_event('raw_reaction_add')
async def reaction_role_add(client, payload): async def reaction_role_add(client, payload):
reaction_message = ReactionRoleMessage.fetch(payload.message_id) reaction_message = ReactionRoleMessage.fetch(payload.message_id)
if payload.guild_id and not payload.member.bot and reaction_message and reaction_message.enabled: if payload.guild_id and payload.user_id != client.user.id and reaction_message and reaction_message.enabled:
try: try:
await reaction_message.process_raw_reaction_add(payload) await reaction_message.process_raw_reaction_add(payload)
except Exception: except Exception: