Skip to content

Commit

Permalink
Change Minecraft role name
Browse files Browse the repository at this point in the history
  • Loading branch information
ceptoplex committed Jul 24, 2023
1 parent 097e091 commit 58c4306
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/trillbot/extensions/minecraftsync.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async def on_member_update(self, before: Member, after: Member):
@staticmethod
async def _check_member_roles(member: Member):
twitch_sub_roles = [x for x in await member.guild.fetch_roles() if 'Twitch Sub' in x.name and 'Minecraft' not in x.name]
minecraft_role = next((x for x in await member.guild.fetch_roles() if 'Minecraft' in x.name), None)
minecraft_role = next((x for x in await member.guild.fetch_roles() if 'Twitch Sub' in x.name and 'Minecraft' in x.name), None)
if len(twitch_sub_roles) == 0 or minecraft_role is None:
return
if len(set(twitch_sub_roles).intersection(member.roles)) > 0 and minecraft_role not in member.roles:
Expand Down

0 comments on commit 58c4306

Please sign in to comment.