feat: use LinkPreviewOptions in answer_query
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
parent
f2b6a2ee8f
commit
84a897868d
1 changed files with 4 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
|||
from uuid import uuid4
|
||||
|
||||
from telegram import Update, InlineKeyboardButton, InlineQueryResultArticle, InputTextMessageContent, \
|
||||
InlineKeyboardMarkup
|
||||
InlineKeyboardMarkup, LinkPreviewOptions
|
||||
from telegram.constants import ParseMode
|
||||
from telegram.ext import ContextTypes
|
||||
|
||||
|
@ -70,9 +70,9 @@ async def answer_query(update: Update, query: str, data) -> None:
|
|||
thumbnail_url=data['preview_file_url'],
|
||||
input_message_content=InputTextMessageContent(
|
||||
f"ID: <code>{query}</code> {rating}\n"
|
||||
f"<a href='{data['large_file_url']}'><b>{characters} ({copyrights})</b> "
|
||||
f"drawn by <b>{artists}</b></a>",
|
||||
parse_mode=ParseMode.HTML
|
||||
f"<b>{characters} ({copyrights})</b> drawn by <b>{artists}</b>",
|
||||
parse_mode=ParseMode.HTML,
|
||||
link_preview_options=LinkPreviewOptions(url=data['large_file_url'])
|
||||
),
|
||||
reply_markup=InlineKeyboardMarkup(keyboard)
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue