mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-07 20:34:52 +00:00
Fixx
This commit is contained in:
parent
be6f9eebea
commit
9fd0d1f69f
1 changed files with 11 additions and 10 deletions
|
|
@ -21,17 +21,18 @@ def split_arr(arr, size):
|
||||||
return arrs
|
return arrs
|
||||||
|
|
||||||
async def getDatalk21(chat_id, message_id, kueri, CurrentPage):
|
async def getDatalk21(chat_id, message_id, kueri, CurrentPage):
|
||||||
lk21json = (await http.get(f'https://yasirapi.eu.org/lk21?q={kueri}')).json()
|
if not LK_DICT.get(message_id):
|
||||||
if not lk21json.get("result"):
|
lk21json = (await http.get(f'https://yasirapi.eu.org/lk21?q={kueri}')).json()
|
||||||
return await app.send_message(
|
if not lk21json.get("result"):
|
||||||
chat_id=chat_id,
|
return await app.send_message(
|
||||||
reply_to_message_id=message_id,
|
chat_id=chat_id,
|
||||||
text=(
|
reply_to_message_id=message_id,
|
||||||
f"Kueri: {kueri}\n"
|
text=(
|
||||||
"Results: Sorry could not find any matching results!"
|
f"Kueri: {kueri}\n"
|
||||||
|
"Results: Sorry could not find any matching results!"
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
LK_DICT[message_id] = [split_arr(lk21json["result"], 6), kueri]
|
||||||
LK_DICT[message_id] = [split_arr(lk21json["result"], 6), kueri]
|
|
||||||
try:
|
try:
|
||||||
index = int(CurrentPage - 1)
|
index = int(CurrentPage - 1)
|
||||||
PageLen = len(LK_DICT[message_id][0])
|
PageLen = len(LK_DICT[message_id][0])
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue