From f07a51f76a8c805ed46a54e6216ff8fb26462819 Mon Sep 17 00:00:00 2001 From: mctaylors Date: Sun, 18 May 2025 11:26:51 +0300 Subject: [PATCH] change: make inline query answer more compact Signed-off-by: mctaylors --- inline_query.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/inline_query.py b/inline_query.py index fa2e71a..a3f19c4 100644 --- a/inline_query.py +++ b/inline_query.py @@ -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: {query} {rating}\n" - f"{characters} ({copyrights}) drawn by {artists}\n" + f"#{query} {characters} ({copyrights}) drawn by {artists} {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: {query} {rating}\n" - f"{characters} ({copyrights}) drawn by {artists}", + f"#{query} {characters} ({copyrights}) drawn by {artists} {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: {query}\n" + f"#{query}\n" f"That record was not found.", parse_mode=ParseMode.HTML )