mirror of
https://github.com/Redume/Shirino.git
synced 2025-02-04 09:58:57 +03:00
chore: Made a regular expression to remove the graph reference from the previews
This commit is contained in:
parent
c7ab4b72f9
commit
f122614b9f
1 changed files with 2 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
|||
from aiogram import types
|
||||
|
||||
import re
|
||||
|
||||
async def reply(result_id: str, args: list, query: types.InlineQuery) -> None:
|
||||
if not args:
|
||||
|
@ -15,7 +16,7 @@ async def reply(result_id: str, args: list, query: types.InlineQuery) -> None:
|
|||
|
||||
article = types.InlineQueryResultArticle(
|
||||
id=f"{result_id}_{idx}",
|
||||
title=title,
|
||||
title=re.sub(r'\bГрафик\b|\[([^\]]+)\]\([^)]+\)', '', title, flags=re.IGNORECASE),
|
||||
thumbnail_url=img,
|
||||
description=description,
|
||||
input_message_content=types.InputTextMessageContent(
|
||||
|
|
Loading…
Add table
Reference in a new issue