URLs for tests implemented
This commit is contained in:
parent
2bd06c4f96
commit
6cfe3b732c
1 changed files with 8 additions and 1 deletions
9
main.py
9
main.py
|
@ -128,12 +128,19 @@ async def get_message_text() -> str:
|
||||||
|
|
||||||
for i in range(len(tests)):
|
for i in range(len(tests)):
|
||||||
test_name = tests[i]["name"].replace("[Тест] ", "").replace("[тест]", "")
|
test_name = tests[i]["name"].replace("[Тест] ", "").replace("[тест]", "")
|
||||||
|
test_url = tests[i].get("url")
|
||||||
no = i + 1
|
no = i + 1
|
||||||
if no < 11:
|
if no < 11:
|
||||||
no = NUMBER_EMOJIS[no] + " "
|
no = NUMBER_EMOJIS[no] + " "
|
||||||
else:
|
else:
|
||||||
no += ". "
|
no += ". "
|
||||||
text += str(no) + "<b>" + test_name
|
text += str(no) + "<b>"
|
||||||
|
|
||||||
|
if test_url:
|
||||||
|
text += f"<a href='{test_url}'>{test_name}</a>"
|
||||||
|
else:
|
||||||
|
text += test_name
|
||||||
|
|
||||||
text += "</b> — "
|
text += "</b> — "
|
||||||
text += await get_human_timedelta(tests[i]["time"])
|
text += await get_human_timedelta(tests[i]["time"])
|
||||||
text += f"\n(<a href='{await generate_link(test_name, tests[i]['time'])}'>"
|
text += f"\n(<a href='{await generate_link(test_name, tests[i]['time'])}'>"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue