Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

include discord name+tag in verification email #111

Merged
merged 2 commits into from
Feb 24, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions apps/discordbot/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,14 @@ def check_msg(msg):
await channel.send(
f"Sending a an email to verify {user.name} to {msg.content}"
)
send_verify_mail(msg.content, user.name)
send_verify_mail(msg.content, user.name + "#" + user.discriminator)
else:
await channel.send(
f"{msg.content} is not a berkeley email. Please fix this"
)
except ValidationError as e:
await channel.send(
f"{msg.content} is not a valid email. Please try again. Details: ",
e,
f"{msg.content} is not a valid email. Please try again. Details: {e}"
)

async def on_message(self, message):
Expand Down Expand Up @@ -107,7 +106,7 @@ def check_thumb(react, _):
await self.wait_for("reaction_add", check=check_thumb)
await self.test_channel.send(f"{member} read rules")
await member.send(
"Verify your berkeley.edu email to gain access. First, pleast type your email. Please contact a moderator if you have any issues."
"Verify your berkeley.edu email to gain access. First, please type your email. Please contact a moderator if you have any issues."
)

await self.test_channel.send(f"{member} was prompted for email")
Expand Down