From ad970e386ee327391f9f6d43b8979864e9634278 Mon Sep 17 00:00:00 2001 From: Aapo Laakkio Date: Thu, 10 Oct 2024 20:58:32 +0300 Subject: [PATCH] Add last poster to answer announcement --- vaalilakanabot2024.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vaalilakanabot2024.py b/vaalilakanabot2024.py index 65883a6..c451138 100644 --- a/vaalilakanabot2024.py +++ b/vaalilakanabot2024.py @@ -181,8 +181,11 @@ def parse_fiirumi_posts(context=updater.bot): question_posts[str(t_id)]["posts_count"] = posts_count _save_data("data/question_posts.json", question_posts) if has_new_posts: + last_poster = question["last_poster_username"] _announce_to_channels( - f"Uusia vastauksia kysymykseen Fiirumilla!\n{title}\n{BASE_URL}/t/{slug}/{t_id}" + f"""Uusia vastauksia Fiirumilla!\n + {title}\n{BASE_URL}/t/{slug}/{t_id}/{posts_count}\n + Viimeisin vastaaja: {last_poster}""" )