Ejemplo n.º 1
0
def _lichess_message(league, username, subject, text):
    if league.enable_notifications:
        try:
            lichessapi.send_mail(username, subject, text)
        except lichessapi.ApiClientError as e:
            reason = str(e)
            if "The message was rejected" in reason:
                return
            raise
Ejemplo n.º 2
0
def notify_slack_link(self, lichess_username):
    player = Player.get_or_create(lichess_username)
    email = slackapi.get_user(player.slack_user_id).email
    msg = 'Your lichess account has been successfully linked with the Slack account "%s".' % email
    lichessapi.send_mail(lichess_username, 'Slack Account Linked', msg)
Ejemplo n.º 3
0
def _lichess_message(league, username, subject, text):
    if league.enable_notifications:
        lichessapi.send_mail(username, subject, text)
Ejemplo n.º 4
0
def _lichess_message(league, username, subject, text):
    if league.enable_notifications:
        lichessapi.send_mail(username, subject, text)