diff --git a/classes/voting_views.py b/classes/voting_views.py index 85e6a24..7933591 100644 --- a/classes/voting_views.py +++ b/classes/voting_views.py @@ -87,6 +87,13 @@ class VoteView(nextcord.ui.View): interaction (nextcord.Interaction): Interaction of user who pressed the button """ + # enforce members only + if self.guild.get_role(self.config.params.clan_member_role_id) not in interaction.user.roles: + await interaction.response.send_message( + f"You must have the <@&{self.config.params.clan_member_role_id}> role to vote.", ephemeral=True + ) + return + election: str = get_election_cycle_name(self.config) with Session(engine) as session: