diff --git a/inline_query.py b/inline_query.py index e6acf7e..0e17a5b 100644 --- a/inline_query.py +++ b/inline_query.py @@ -48,13 +48,24 @@ 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( - html_parser.code(f"#{query}") - + html_parser.strikethrough( - f" {html_parser.bold(f"{characters} ({copyrights})")}" - f"drawn by {html_parser.bold(artists)}" - ) - + rating - + "\nThis post has been removed because of a takedown request or rule violation.", + " ".join( + [ + html_parser.code(f"#{query}"), + html_parser.strikethrough( + " ".join( + [ + html_parser.bold( + f"{characters} ({copyrights})" + ), + "drawn by", + html_parser.bold(artists), + ] + ) + ), + rating, + "\nThis post has been removed because of a takedown request or rule violation.", + ] + ), parse_mode=ParseMode.HTML, ), ) @@ -80,8 +91,15 @@ 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( - html_parser.code(f"#{query}") - + f" {html_parser.bold(f"{characters} ({copyrights})")} drawn by {html_parser.bold(artists)} {rating}", + " ".join( + [ + html_parser.code(f"#{query}"), + html_parser.bold(f"{characters} ({copyrights})"), + "drawn by", + html_parser.bold(artists), + rating, + ] + ), parse_mode=ParseMode.HTML, link_preview_options=LinkPreviewOptions(url=data["large_file_url"]), ), @@ -99,7 +117,7 @@ async def invalid_query(update: Update, query: str) -> None: title=f"ID: {query}", description="Error", input_message_content=InputTextMessageContent( - html_parser.code(f"#{query}") + "That record was not found.", + " ".join([html_parser.code(f"#{query}"), "That record was not found."]), parse_mode=ParseMode.HTML, ), )