mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-05 03:34:51 +00:00
fix
This commit is contained in:
parent
fc4347f871
commit
52648b6759
1 changed files with 26 additions and 29 deletions
|
|
@ -106,16 +106,13 @@ async def inline_menu(_, inline_query: InlineQuery):
|
||||||
for method in parsemethod:
|
for method in parsemethod:
|
||||||
if kueri.lower() in method.lower():
|
if kueri.lower() in method.lower():
|
||||||
link = parsemethod[method]["href"]
|
link = parsemethod[method]["href"]
|
||||||
LOGGER.info(link)
|
|
||||||
description = parsemethod[method]["description"][0]
|
description = parsemethod[method]["description"][0]
|
||||||
LOGGER.info(description)
|
|
||||||
buttons = InlineKeyboard()
|
buttons = InlineKeyboard()
|
||||||
buttons.row(
|
buttons.row(
|
||||||
InlineButton("Open Docs", url=link),
|
InlineButton("Open Docs", url=link),
|
||||||
InlineButton("Search Again", switch_inline_query_current_chat=inline_query.query),
|
InlineButton("Search Again", switch_inline_query_current_chat=inline_query.query),
|
||||||
)
|
)
|
||||||
returns = "".join(f"{i}, " for i in parsemethod[method]["returns"])
|
returns = "".join(f"{i}, " for i in parsemethod[method]["returns"])
|
||||||
LOGGER.info(returns)
|
|
||||||
msg = f"<b>{method}</b> (<code>{returns[:-2]}</code>)\n"
|
msg = f"<b>{method}</b> (<code>{returns[:-2]}</code>)\n"
|
||||||
msg += f"<b>Description:</b> {description}\n\n"
|
msg += f"<b>Description:</b> {description}\n\n"
|
||||||
msg += f"<b>Variables:</b>\n"
|
msg += f"<b>Variables:</b>\n"
|
||||||
|
|
@ -134,32 +131,32 @@ async def inline_menu(_, inline_query: InlineQuery):
|
||||||
reply_markup=buttons,
|
reply_markup=buttons,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
# for types in parsetypes:
|
for types in parsetypes:
|
||||||
# if kueri.lower() in types.lower():
|
if kueri.lower() in types.lower():
|
||||||
# link = parsetypes[types]["href"]
|
link = parsetypes[types]["href"]
|
||||||
# description = parsetypes[types]["description"]
|
description = parsetypes[types]["description"]
|
||||||
# buttons = InlineKeyboard()
|
buttons = InlineKeyboard()
|
||||||
# buttons.row(
|
buttons.row(
|
||||||
# InlineButton("Open Docs", url=link),
|
InlineButton("Open Docs", url=link),
|
||||||
# InlineButton("Search Again", switch_inline_query_current_chat=inline_query.query),
|
InlineButton("Search Again", switch_inline_query_current_chat=inline_query.query),
|
||||||
# )
|
)
|
||||||
# msg += f"<b>Description:</b> {description}\n\n"
|
msg += f"<b>Description:</b> {description}\n\n"
|
||||||
# msg += f"<b>Variables:</b>\n"
|
msg += f"<b>Variables:</b>\n"
|
||||||
# # msg += f"<code>{parsetypes[types]['fields']['name']}<code> ({fields[:-2]})\n{parsetypes[types]['fields']['description']}\n\n"
|
# msg += f"<code>{parsetypes[types]['fields']['name']}<code> ({fields[:-2]})\n{parsetypes[types]['fields']['description']}\n\n"
|
||||||
# datajson.append(
|
datajson.append(
|
||||||
# InlineQueryResultArticle(
|
InlineQueryResultArticle(
|
||||||
# title=types,
|
title=types,
|
||||||
# input_message_content=InputTextMessageContent(
|
input_message_content=InputTextMessageContent(
|
||||||
# message_text=msg,
|
message_text=msg,
|
||||||
# parse_mode=enums.ParseMode.HTML,
|
parse_mode=enums.ParseMode.HTML,
|
||||||
# disable_web_page_preview=False,
|
disable_web_page_preview=False,
|
||||||
# ),
|
),
|
||||||
# url=link,
|
url=link,
|
||||||
# description=description,
|
description=description,
|
||||||
# thumb_url="https://img.freepik.com/premium-vector/open-folder-folder-with-documents-document-protection-concept_183665-104.jpg",
|
thumb_url="https://img.freepik.com/premium-vector/open-folder-folder-with-documents-document-protection-concept_183665-104.jpg",
|
||||||
# reply_markup=buttons,
|
reply_markup=buttons,
|
||||||
# )
|
)
|
||||||
# )
|
)
|
||||||
await inline_query.answer(
|
await inline_query.answer(
|
||||||
results=datajson,
|
results=datajson,
|
||||||
is_gallery=False,
|
is_gallery=False,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue