Compare commits

..

No commits in common. "4225b6e8a3bb5a54df7a4a0d96bd048cddcc5013" and "736967ccc254ea47df0c092473ca6a691b02f583" have entirely different histories.

2 changed files with 5 additions and 6 deletions

View file

@ -73,7 +73,7 @@ class TelegramAdapter:
# unpin 模块 # unpin 模块
# 不知道为什么检测不到频道的消息被置顶这个事件,暂时认为所有的频道消息都是被置顶的 # 不知道为什么检测不到频道的消息被置顶这个事件,暂时认为所有的频道消息都是被置顶的
unpin_router.message(F.chat.type.in_({'group', 'supergroup'}) & F.sender_chat & ( unpin_router.message(F.chat.type.in_({'group', 'supergroup'}) & F.sender_chat & (
F.sender_chat.type == 'channel'))( F.sender_chat.type == 'channel') & F.is_automatic_forward)(
handle_unpin_channel_message) handle_unpin_channel_message)
# repeater 模块 # repeater 模块
repeater_router.message(F.chat.type.in_({'group', 'supergroup'}))(MessageRepeater().handle_message) repeater_router.message(F.chat.type.in_({'group', 'supergroup'}))(MessageRepeater().handle_message)

View file

@ -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 Text, ExpandableBlockQuote from aiogram.utils.formatting import BlockQuote, Text
async def handle_inline_query(query: InlineQuery): async def handle_inline_query(query: InlineQuery):
@ -162,11 +162,10 @@ 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(ExpandableBlockQuote(description)).as_html()}", f"播放量:{play} {Text(BlockQuote(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)