Skip to content

Commit

Permalink
Add last poster to answer announcement
Browse files Browse the repository at this point in the history
  • Loading branch information
ApsiV11 committed Oct 10, 2024
1 parent 4ae5099 commit ad970e3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion vaalilakanabot2024.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"<b>Uusia vastauksia kysymykseen Fiirumilla!</b>\n{title}\n{BASE_URL}/t/{slug}/{t_id}"
f"""<b>Uusia vastauksia Fiirumilla!</b>\n
{title}\n{BASE_URL}/t/{slug}/{t_id}/{posts_count}\n
Viimeisin vastaaja: {last_poster}"""
)


Expand Down

0 comments on commit ad970e3

Please sign in to comment.