diff --git a/mastochess.py b/mastochess.py index e480968..b9985d6 100644 --- a/mastochess.py +++ b/mastochess.py @@ -1507,6 +1507,30 @@ if __name__ == '__main__': update_replies(status_id, username, now) + elif query_word[0:5] == 'envia': + + query_word_length = len(query_word) + + send_game = query_word[6:query_word_length].replace(' ', '') + + emailed, game_id, game_found = send_anotation(send_game) + + if emailed == False and game_found == True: + + toot_text = "@"+username + " error al enviar les anotacions :-(" + + elif emailed == True and game_found == True: + + toot_text = "@"+username + " les anotaciones de la partida n." + str(game_id) + " enviades amb èxit!" + + elif emailed == False and game_found == False: + + toot_text = "@"+username + " la partida n." + str(game_id) + " no existeix..." + + mastodon.status_post(toot_text, in_reply_to_id=status_id,visibility=visibility) + + update_replies(status_id, username, now) + else: if playing_user == None: