chore: minimal text changes to b23 search
This commit is contained in:
parent
736967ccc2
commit
9bd06a0bda
1 changed files with 5 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
||||||
from aiogram.enums import ParseMode
|
from aiogram.enums import ParseMode
|
||||||
from aiogram.types import InlineQuery, InlineQueryResultArticle, InputTextMessageContent
|
from aiogram.types import InlineQuery, InlineQueryResultArticle, InputTextMessageContent
|
||||||
from aiogram.utils.formatting import BlockQuote, Text
|
from aiogram.utils.formatting import Text, ExpandableBlockQuote
|
||||||
|
|
||||||
|
|
||||||
async def handle_inline_query(query: InlineQuery):
|
async def handle_inline_query(query: InlineQuery):
|
||||||
|
@ -162,10 +162,11 @@ async def handle_inline_query(query: InlineQuery):
|
||||||
thumbnail_url=thumbnail,
|
thumbnail_url=thumbnail,
|
||||||
input_message_content=InputTextMessageContent(
|
input_message_content=InputTextMessageContent(
|
||||||
message_text=f"<a href=\"{link}\">{title}</a>\n{video_type} | 作者:{author} | "
|
message_text=f"<a href=\"{link}\">{title}</a>\n{video_type} | 作者:{author} | "
|
||||||
f"播放量:{play} {Text(BlockQuote(description)).as_html()}",
|
f"播放量:{play} {Text(ExpandableBlockQuote(description)).as_html()}",
|
||||||
parse_mode=ParseMode.HTML
|
parse_mode=ParseMode.HTML,
|
||||||
|
disable_web_page_preview=True
|
||||||
),
|
),
|
||||||
description=f"{bvid} | 作者:{author} | 播放量:{play}"
|
description=f"{bvid} | {author} | {play}次播放"
|
||||||
))
|
))
|
||||||
if b23_query and search_results:
|
if b23_query and search_results:
|
||||||
await query.answer(results=search_results, cache_time=0)
|
await query.answer(results=search_results, cache_time=0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue