Skip to content

Commit

Permalink
Make this yoke functional
Browse files Browse the repository at this point in the history
  • Loading branch information
koyakonsta authored Feb 1, 2024
1 parent b801a72 commit ae20f61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/extensions/userroles.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ async def add_role(
assert ctx.member

role_id = int(role)
if role_id not in ctx.member.ROLE_CHOICES:
if role_id not in ctx.member.role_ids:
await ctx.client.rest.add_role_to_member(
ctx.guild_id, ctx.author, int(role), reason=f"{ctx.author} added role."
)
Expand All @@ -36,7 +36,7 @@ async def remove_role(
assert ctx.member

role_id = int(role)
if role_id in ctx.member.ROLE_CHOICES:
if role_id in ctx.member.role_ids:
await ctx.client.rest.remove_role_from_member(
ctx.guild_id, ctx.author, int(role), reason=f"{ctx.author} removed role."
)
Expand Down

0 comments on commit ae20f61

Please sign in to comment.