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

discordbot bug: invalid email retry logic broken #97

Open
robertquitt opened this issue Feb 1, 2021 · 1 comment
Open

discordbot bug: invalid email retry logic broken #97

robertquitt opened this issue Feb 1, 2021 · 1 comment
Assignees

Comments

@robertquitt
Copy link
Member

Jan 31 16:18:57 tap gunicorn[13171]: Ignoring exception in on_member_join
Jan 31 16:18:57 tap gunicorn[13171]: Traceback (most recent call last):
Jan 31 16:18:57 tap gunicorn[13171]:   File "/webserver/csua-backend/apps/discordbot/bot.py", line 49, in verify_member_email
Jan 31 16:18:57 tap gunicorn[13171]:     validate_email(msg.content)
Jan 31 16:18:57 tap gunicorn[13171]:   File "/webserver/csua-backend/venv/lib/python3.6/site-packages/django/core/validators.py", line 191, in __call__
Jan 31 16:18:57 tap gunicorn[13171]:     raise ValidationError(self.message, code=self.code)
Jan 31 16:18:57 tap gunicorn[13171]: django.core.exceptions.ValidationError: ['Enter a valid email address.']
Jan 31 16:18:57 tap gunicorn[13171]: During handling of the above exception, another exception occurred:
Jan 31 16:18:57 tap gunicorn[13171]: Traceback (most recent call last):
Jan 31 16:18:57 tap gunicorn[13171]:   File "/webserver/csua-backend/venv/lib/python3.6/site-packages/discord/client.py", line 343, in _run_event
Jan 31 16:18:57 tap gunicorn[13171]:     await coro(*args, **kwargs)
Jan 31 16:18:57 tap gunicorn[13171]:   File "/webserver/csua-backend/apps/discordbot/bot.py", line 112, in on_member_join
Jan 31 16:18:57 tap gunicorn[13171]:     await self.verify_member_email(member)
Jan 31 16:18:57 tap gunicorn[13171]:   File "/webserver/csua-backend/apps/discordbot/bot.py", line 63, in verify_member_email
Jan 31 16:18:57 tap gunicorn[13171]:     e,
Jan 31 16:18:57 tap gunicorn[13171]: TypeError: send() takes from 1 to 2 positional arguments but 3 were given

except ValidationError as e:
await channel.send(
f"{msg.content} is not a valid email. Please try again. Details: ",
e,
)

@robertquitt
Copy link
Member Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants