Skip to content

Commit

Permalink
Don't allow members to verify twice
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrxyz committed Apr 14, 2024
1 parent 8fb9468 commit 89b749c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/verification.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,12 @@ async def verify_email(
button: discord.ui.Button,
):
assert isinstance(interaction.user, discord.Member)
if self.bot.verified_role in interaction.user.roles:
await interaction.response.send_message(
"You are already verified!",
ephemeral=True,
)
return
self.welcoming = self.bot.unverified_role not in interaction.user.roles
await interaction.response.send_modal(
EmailModal(self.bot, welcoming=self.welcoming),
Expand Down

0 comments on commit 89b749c

Please sign in to comment.