mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-07 12:24:51 +00:00
Revert because stuck
This commit is contained in:
parent
24b6ed159e
commit
1bb054b2ce
2 changed files with 34 additions and 30 deletions
|
|
@ -81,7 +81,7 @@ if __name__ == "__main__":
|
||||||
pass
|
pass
|
||||||
except Exception:
|
except Exception:
|
||||||
err = traceback.format_exc()
|
err = traceback.format_exc()
|
||||||
print(err)
|
LOGGER.info(err)
|
||||||
finally:
|
finally:
|
||||||
loop.stop()
|
loop.stop()
|
||||||
print("------------------------ Stopped Services ------------------------")
|
LOGGER.info("------------------------ Stopped Services ------------------------")
|
||||||
|
|
|
||||||
|
|
@ -155,6 +155,7 @@ async def imdb_search_id(kueri, message):
|
||||||
)
|
)
|
||||||
buttons.add(*BTN)
|
buttons.add(*BTN)
|
||||||
msg = await k.edit_caption(msg, reply_markup=buttons)
|
msg = await k.edit_caption(msg, reply_markup=buttons)
|
||||||
|
try:
|
||||||
await msg.wait_for_click(
|
await msg.wait_for_click(
|
||||||
from_user_id=message.from_user.id,
|
from_user_id=message.from_user.id,
|
||||||
timeout=30
|
timeout=30
|
||||||
|
|
@ -162,7 +163,7 @@ async def imdb_search_id(kueri, message):
|
||||||
except ListenerTimeout:
|
except ListenerTimeout:
|
||||||
await msg.edit_caption("😶🌫️ Waktu Habis. Task Telah Dibatalkan!")
|
await msg.edit_caption("😶🌫️ Waktu Habis. Task Telah Dibatalkan!")
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
await msg.edit_caption(f"Ooppss, gagal mendapatkan daftar judul di IMDb. Mungkin terkena rate limit atau down.\n\n<b>ERROR:</b> <code>{err}</code>")
|
await k.edit_caption(f"Ooppss, gagal mendapatkan daftar judul di IMDb. Mungkin terkena rate limit atau down.\n\n<b>ERROR:</b> <code>{err}</code>")
|
||||||
|
|
||||||
|
|
||||||
async def imdb_search_en(kueri, message):
|
async def imdb_search_en(kueri, message):
|
||||||
|
|
@ -211,6 +212,7 @@ async def imdb_search_en(kueri, message):
|
||||||
)
|
)
|
||||||
buttons.add(*BTN)
|
buttons.add(*BTN)
|
||||||
msg = await k.edit_caption(msg, reply_markup=buttons)
|
msg = await k.edit_caption(msg, reply_markup=buttons)
|
||||||
|
try:
|
||||||
await msg.wait_for_click(
|
await msg.wait_for_click(
|
||||||
from_user_id=message.from_user.id,
|
from_user_id=message.from_user.id,
|
||||||
timeout=30
|
timeout=30
|
||||||
|
|
@ -218,7 +220,7 @@ async def imdb_search_en(kueri, message):
|
||||||
except ListenerTimeout:
|
except ListenerTimeout:
|
||||||
await msg.edit_caption("😶🌫️ Timeout. Task Has Been Cancelled!")
|
await msg.edit_caption("😶🌫️ Timeout. Task Has Been Cancelled!")
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
await msg.edit_caption(f"Failed when requesting movies title. Maybe got rate limit or down.\n\n<b>ERROR:</b> <code>{err}</code>")
|
await k.edit_caption(f"Failed when requesting movies title. Maybe got rate limit or down.\n\n<b>ERROR:</b> <code>{err}</code>")
|
||||||
|
|
||||||
|
|
||||||
@app.on_callback_query(filters.regex("^imdbcari"))
|
@app.on_callback_query(filters.regex("^imdbcari"))
|
||||||
|
|
@ -263,6 +265,7 @@ async def imdbcari(self: Client, query: CallbackQuery):
|
||||||
)
|
)
|
||||||
buttons.add(*BTN)
|
buttons.add(*BTN)
|
||||||
msg = await query.message.edit_caption(msg, reply_markup=buttons)
|
msg = await query.message.edit_caption(msg, reply_markup=buttons)
|
||||||
|
try:
|
||||||
await msg.wait_for_click(
|
await msg.wait_for_click(
|
||||||
from_user_id=int(uid),
|
from_user_id=int(uid),
|
||||||
timeout=30
|
timeout=30
|
||||||
|
|
@ -270,7 +273,7 @@ async def imdbcari(self: Client, query: CallbackQuery):
|
||||||
except ListenerTimeout:
|
except ListenerTimeout:
|
||||||
await msg.edit_caption("😶🌫️ Waktu Habis. Task Telah Dibatalkan!")
|
await msg.edit_caption("😶🌫️ Waktu Habis. Task Telah Dibatalkan!")
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
await msg.edit_caption(f"Ooppss, gagal mendapatkan daftar judul di IMDb. Mungkin terkena rate limit atau down.\n\n<b>ERROR:</b> <code>{err}</code>")
|
await query.message.edit_caption(f"Ooppss, gagal mendapatkan daftar judul di IMDb. Mungkin terkena rate limit atau down.\n\n<b>ERROR:</b> <code>{err}</code>")
|
||||||
else:
|
else:
|
||||||
if query.from_user.id != int(uid):
|
if query.from_user.id != int(uid):
|
||||||
return await query.answer("⚠️ Access Denied!", True)
|
return await query.answer("⚠️ Access Denied!", True)
|
||||||
|
|
@ -308,14 +311,15 @@ async def imdbcari(self: Client, query: CallbackQuery):
|
||||||
)
|
)
|
||||||
buttons.add(*BTN)
|
buttons.add(*BTN)
|
||||||
msg = await query.message.edit_caption(msg, reply_markup=buttons)
|
msg = await query.message.edit_caption(msg, reply_markup=buttons)
|
||||||
|
try:
|
||||||
await msg.wait_for_click(
|
await msg.wait_for_click(
|
||||||
from_user_id=int(uid),
|
from_user_id=int(uid),
|
||||||
timeout=30
|
timeout=30
|
||||||
)
|
)
|
||||||
except ListenerTimeout:
|
except ListenerTimeout:
|
||||||
await msg.edit_caption("😶🌫️ Timeout. Task Has Been Cancelled!")
|
return await msg.edit_caption("😶🌫️ Timeout. Task Has Been Cancelled!")
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
await msg.edit_caption(f"Failed when requesting movies title. Maybe got rate limit or down.\n\n<b>ERROR:</b> <code>{err}</code>")
|
await query.message.edit_caption(f"Failed when requesting movies title. Maybe got rate limit or down.\n\n<b>ERROR:</b> <code>{err}</code>")
|
||||||
|
|
||||||
|
|
||||||
@app.on_callback_query(filters.regex("^imdbres_id"))
|
@app.on_callback_query(filters.regex("^imdbres_id"))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue