Fix Msg id Invalid

This commit is contained in:
yasirarism 2023-04-28 13:03:30 +07:00 committed by GitHub
parent cba00e470c
commit b24cbc952d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -155,12 +155,13 @@ async def imdb_search_id(kueri, message):
)
buttons.add(*BTN)
msg = await k.edit_caption(msg, reply_markup=buttons)
await msg.wait_for_click(
from_user_id=message.from_user.id,
timeout=30
)
except ListenerTimeout:
await msg.edit_caption("😶‍🌫️ Waktu Habis. Task Telah Dibatalkan!")
try:
await msg.wait_for_click(
from_user_id=message.from_user.id,
timeout=30
)
except ListenerTimeout:
await msg.edit_caption("😶‍🌫️ Waktu Habis. Task Telah Dibatalkan!")
except Exception as err:
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>")
@ -211,12 +212,13 @@ async def imdb_search_en(kueri, message):
)
buttons.add(*BTN)
msg = await k.edit_caption(msg, reply_markup=buttons)
await msg.wait_for_click(
from_user_id=message.from_user.id,
timeout=30
)
except ListenerTimeout:
await msg.edit_caption("😶‍🌫️ Timeout. Task Has Been Cancelled!")
try:
await msg.wait_for_click(
from_user_id=message.from_user.id,
timeout=30
)
except ListenerTimeout:
await msg.edit_caption("😶‍🌫️ Timeout. Task Has Been Cancelled!")
except Exception as err:
await k.edit_caption(f"Failed when requesting movies title. Maybe got rate limit or down.\n\n<b>ERROR:</b> <code>{err}</code>")
@ -263,12 +265,13 @@ async def imdbcari(self: Client, query: CallbackQuery):
)
buttons.add(*BTN)
msg = await query.message.edit_caption(msg, reply_markup=buttons)
await msg.wait_for_click(
from_user_id=int(uid),
timeout=30
)
except ListenerTimeout:
await msg.edit_caption("😶‍🌫️ Waktu Habis. Task Telah Dibatalkan!")
try:
await msg.wait_for_click(
from_user_id=int(uid),
timeout=30
)
except ListenerTimeout:
await msg.edit_caption("😶‍🌫️ Waktu Habis. Task Telah Dibatalkan!")
except Exception as err:
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:
@ -308,12 +311,13 @@ async def imdbcari(self: Client, query: CallbackQuery):
)
buttons.add(*BTN)
msg = await query.message.edit_caption(msg, reply_markup=buttons)
await msg.wait_for_click(
from_user_id=int(uid),
timeout=30
)
except ListenerTimeout:
await msg.edit_caption("😶‍🌫️ Timeout. Task Has Been Cancelled!")
try:
await msg.wait_for_click(
from_user_id=int(uid),
timeout=30
)
except ListenerTimeout:
await msg.edit_caption("😶‍🌫️ Timeout. Task Has Been Cancelled!")
except Exception as err:
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>")