From a607febc10a294741e9b7c9c94250a41dea16201 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 5 Apr 2022 15:32:27 +0200 Subject: [PATCH] sfd --- files/routes/comments.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/files/routes/comments.py b/files/routes/comments.py index ea5775772..6605cb027 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -657,14 +657,8 @@ def api_comment(v): check_for_blackjack_commands(body, v, c) - if not c.slots_result and not c.blackjack_result: - - if v.marseyawarded and parent_post.id not in ADMIGGERS and marseyaward_body_regex.search(body_html): - return {"error":"You can only type marseys!"}, 403 - - if not c.wordle_result and not rts: - parent_post.comment_count += 1 - g.db.add(parent_post) + if not c.slots_result and not c.blackjack_result and v.marseyawarded and parent_post.id not in ADMIGGERS and marseyaward_body_regex.search(body_html): + return {"error":"You can only type marseys!"}, 403 check_for_treasure(body, c) @@ -672,6 +666,10 @@ def api_comment(v): answer = random.choice(WORDLE_LIST) c.wordle_result = f'_active_{answer}' + if not c.slots_result and not c.blackjack_result and not c.wordle_result and not rts: + parent_post.comment_count += 1 + g.db.add(parent_post) + g.db.commit() if request.headers.get("Authorization"): return c.json