From 8e45cdb37d887bdf67b0a4a91188c248cb382cca Mon Sep 17 00:00:00 2001 From: Nikita Aksenov Date: Thu, 6 Mar 2025 23:59:27 +0300 Subject: [PATCH] #6 Added deadline links (v1.1) --- main.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 8d3b491..3b4b584 100644 --- a/main.py +++ b/main.py @@ -119,7 +119,13 @@ def get_message_text() -> str: no = NUMBER_EMOJIS[no] + " " else: no += ". " - text += str(no) + "" + deadlines[i]["name"] + text += str(no) + "" + + if deadlines[i].get("url"): + text += f"{deadlines[i]['name']}" + else: + text += deadlines[i]["name"] + text += " — " text += get_human_timedelta(deadlines[i]["time"]) text += f"\n("