mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-05 19:44:51 +00:00
fix
This commit is contained in:
parent
3e5b4caf4e
commit
2b8b7940af
1 changed files with 11 additions and 2 deletions
|
|
@ -23,8 +23,7 @@ from pyrogram.types import (
|
||||||
)
|
)
|
||||||
|
|
||||||
from misskaty import BOT_USERNAME, app, user
|
from misskaty import BOT_USERNAME, app, user
|
||||||
from misskaty.helper.http import http
|
from misskaty.helper import post_to_telegraph, http, GENRES_EMOJI, search_jw
|
||||||
from misskaty.helper.tools import GENRES_EMOJI, search_jw
|
|
||||||
from misskaty.plugins.misc_tools import get_content
|
from misskaty.plugins.misc_tools import get_content
|
||||||
from utils import demoji
|
from utils import demoji
|
||||||
|
|
||||||
|
|
@ -119,6 +118,11 @@ async def inline_menu(_, inline_query: InlineQuery):
|
||||||
if parsemethod[method].get("fields"):
|
if parsemethod[method].get("fields"):
|
||||||
for i in parsemethod[method]["fields"]:
|
for i in parsemethod[method]["fields"]:
|
||||||
msg += f"<code>{i['name']}</code> (<b>{i['types'][0]}</b>)\n<b>Required:</b> <code>{i['required']}</code>\n{i['description']}\n\n"
|
msg += f"<code>{i['name']}</code> (<b>{i['types'][0]}</b>)\n<b>Required:</b> <code>{i['required']}</code>\n{i['description']}\n\n"
|
||||||
|
if len(msg.encode("utf-8")) > 4096:
|
||||||
|
body_text = f"""
|
||||||
|
<pre>{msg}</pre>
|
||||||
|
"""
|
||||||
|
msg = post_to_telegraph(method, body_text)
|
||||||
datajson.append(
|
datajson.append(
|
||||||
InlineQueryResultArticle(
|
InlineQueryResultArticle(
|
||||||
title=method,
|
title=method,
|
||||||
|
|
@ -148,6 +152,11 @@ async def inline_menu(_, inline_query: InlineQuery):
|
||||||
if parsetypes[types].get("fields"):
|
if parsetypes[types].get("fields"):
|
||||||
for i in parsetypes[types]["fields"]:
|
for i in parsetypes[types]["fields"]:
|
||||||
msg += f"<code>{i['name']}</code> (<b>{i['types'][0]}</b>)\n<b>Required:</b> <code>{i['required']}</code>\n{i['description']}\n\n"
|
msg += f"<code>{i['name']}</code> (<b>{i['types'][0]}</b>)\n<b>Required:</b> <code>{i['required']}</code>\n{i['description']}\n\n"
|
||||||
|
if len(msg.encode("utf-8")) > 4096:
|
||||||
|
body_text = f"""
|
||||||
|
<pre>{msg}</pre>
|
||||||
|
"""
|
||||||
|
msg = post_to_telegraph(method, body_text)
|
||||||
datajson.append(
|
datajson.append(
|
||||||
InlineQueryResultArticle(
|
InlineQueryResultArticle(
|
||||||
title=types,
|
title=types,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue