Compare commits
2 commits
736967ccc2
...
4225b6e8a3
Author | SHA1 | Date | |
---|---|---|---|
4225b6e8a3 | |||
9bd06a0bda |
2 changed files with 6 additions and 5 deletions
|
@ -73,7 +73,7 @@ class TelegramAdapter:
|
|||
# unpin 模块
|
||||
# 不知道为什么检测不到频道的消息被置顶这个事件,暂时认为所有的频道消息都是被置顶的
|
||||
unpin_router.message(F.chat.type.in_({'group', 'supergroup'}) & F.sender_chat & (
|
||||
F.sender_chat.type == 'channel') & F.is_automatic_forward)(
|
||||
F.sender_chat.type == 'channel'))(
|
||||
handle_unpin_channel_message)
|
||||
# repeater 模块
|
||||
repeater_router.message(F.chat.type.in_({'group', 'supergroup'}))(MessageRepeater().handle_message)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from aiogram.enums import ParseMode
|
||||
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):
|
||||
|
@ -162,10 +162,11 @@ async def handle_inline_query(query: InlineQuery):
|
|||
thumbnail_url=thumbnail,
|
||||
input_message_content=InputTextMessageContent(
|
||||
message_text=f"<a href=\"{link}\">{title}</a>\n{video_type} | 作者:{author} | "
|
||||
f"播放量:{play} {Text(BlockQuote(description)).as_html()}",
|
||||
parse_mode=ParseMode.HTML
|
||||
f"播放量:{play} {Text(ExpandableBlockQuote(description)).as_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:
|
||||
await query.answer(results=search_results, cache_time=0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue