change: make inline query answer more compact

Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
Macintxsh 2025-05-18 11:26:51 +03:00
parent df1735ef36
commit f07a51f76a
Signed by: mctaylors
GPG key ID: 4EEF4F949A266EE2

View file

@ -43,8 +43,7 @@ async def answer_query(update: Update, query: str, data) -> None:
title=f"ID: {query}",
description=f"{characters} ({copyrights}) drawn by {artists}",
input_message_content=InputTextMessageContent(
f"ID: <code>{query}</code> {rating}\n"
f"<s><b>{characters} ({copyrights})</b> drawn by <b>{artists}</b></s>\n"
f"<code>#{query}</code> <s><b>{characters} ({copyrights})</b> drawn by <b>{artists}</b></s> {rating}\n"
f"This post has been removed because of a takedown request or rule violation.",
parse_mode=ParseMode.HTML
)
@ -69,8 +68,7 @@ async def answer_query(update: Update, query: str, data) -> None:
description=f"{characters} ({copyrights}) drawn by {artists}",
thumbnail_url=data['preview_file_url'],
input_message_content=InputTextMessageContent(
f"ID: <code>{query}</code> {rating}\n"
f"<b>{characters} ({copyrights})</b> drawn by <b>{artists}</b>",
f"<code>#{query}</code> <b>{characters} ({copyrights})</b> drawn by <b>{artists}</b> {rating}",
parse_mode=ParseMode.HTML,
link_preview_options=LinkPreviewOptions(url=data['large_file_url'])
),
@ -88,7 +86,7 @@ async def invalid_query(update: Update, query: str) -> None:
title=f"ID: {query}",
description="Error",
input_message_content=InputTextMessageContent(
f"ID: <code>{query}</code>\n"
f"<code>#{query}</code>\n"
f"That record was not found.",
parse_mode=ParseMode.HTML
)