Skip to content

Commit

Permalink
Fixed member_update in roles after get_output > dict
Browse files Browse the repository at this point in the history
  • Loading branch information
geirawsm committed Dec 23, 2024
1 parent ddd23f2 commit 0192e24
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sausage_bot/cogs/roles.py
Original file line number Diff line number Diff line change
Expand Up @@ -1944,7 +1944,7 @@ async def on_raw_reaction_add(payload):
incoming_emoji, reaction['emoji']
)
)
if str(incoming_emoji) == str(reaction[0]):
if str(incoming_emoji) == str(reaction['emoji']):
await _guild.get_member(
payload.user_id
).add_roles(
Expand Down Expand Up @@ -1976,6 +1976,7 @@ async def on_raw_reaction_remove(payload):
envs.roles_db_msgs_schema,
select=('msg_id')
)
log.verbose(f'reaction_messages: {reaction_messages}')
_guild = discord_commands.get_guild()
for reaction_message in reaction_messages:
if str(payload.message_id) == str(reaction_message['msg_id']):
Expand All @@ -1989,7 +1990,7 @@ async def on_raw_reaction_remove(payload):
'emoji'
],
where=[
('A.msg_id', reaction_message[0])
('A.msg_id', reaction_message['msg_id'])
]
)
log.verbose(f'`reactions`: {reactions}')
Expand Down Expand Up @@ -2048,6 +2049,7 @@ async def on_member_update(before, after):
where=('setting', 'unique'),
single=True
)
unique_role = unique_role['value']
log.debug(f'Got `unique_role`: {unique_role}')
if not unique_role or unique_role == '':
log.log('No unique role provided or setting is not string')
Expand Down

0 comments on commit 0192e24

Please sign in to comment.