Skip to content

Commit

Permalink
- fix bug with role check on update role command
Browse files Browse the repository at this point in the history
  • Loading branch information
emberdex committed Nov 2, 2023
1 parent 58dae55 commit edf70da
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions harmony_cogs/verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,15 @@
verified_role = discord.Object(
config.get_configuration_key("discord.verified_role_id", required=True, expected_type=int)
)
user_management_role = discord.Object(
config.get_configuration_key("discord.harmony_management_role_id", required=True, expected_type=int)

user_management_role_id = config.get_configuration_key(
"discord.harmony_management_role_id",
required=True,
expected_type=int
)

user_management_role = discord.Object(user_management_role_id)


class Verify(commands.Cog):
_cog_name = "verify"
Expand Down Expand Up @@ -149,7 +154,7 @@ async def whois(self, interaction: discord.Interaction, query: str):
except Exception as e:
await harmony_ui.handle_error(interaction, e)

@app_commands.checks.has_role(user_management_role)
@app_commands.checks.has_role(user_management_role_id)
async def update_role(self, interaction: discord.Interaction, member: discord.Member):
try:
verification_data = harmony_db.get_verification_data(discord_user_id=member.id)
Expand Down

0 comments on commit edf70da

Please sign in to comment.