diff --git a/harmony_cogs/verify.py b/harmony_cogs/verify.py index 04408fc..3236153 100644 --- a/harmony_cogs/verify.py +++ b/harmony_cogs/verify.py @@ -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" @@ -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)