Enforce having clan member role for voting.
build_develop / build (push) Successful in 1m31s

This commit is contained in:
2023-11-03 14:27:21 -04:00
parent 5803c336c0
commit 66e7159022
+7
View File
@@ -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: