mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-02 10:44:50 +00:00
Fix listener timeout on media extractor
Signed-off-by: Yasir Aris M <git@yasirdev.my.id>
This commit is contained in:
parent
484a1e7f00
commit
60c32ca7c1
1 changed files with 8 additions and 7 deletions
|
|
@ -113,13 +113,14 @@ async def ceksub(_, ctx: Message, strings):
|
|||
buttons.append(
|
||||
[InlineKeyboardButton(strings("cancel_btn"), f"close#{ctx.from_user.id}")]
|
||||
)
|
||||
msg = await pesan.edit_msg(
|
||||
strings("press_btn_msg").format(timelog=get_readable_time(timelog)),
|
||||
reply_markup=InlineKeyboardMarkup(buttons),
|
||||
)
|
||||
await msg.wait_for_click(from_user_id=ctx.from_user.id, timeout=30)
|
||||
except ListenerTimeout:
|
||||
await msg.edit_msg(strings("exp_task", context="general"))
|
||||
try:
|
||||
msg = await pesan.edit_msg(
|
||||
strings("press_btn_msg").format(timelog=get_readable_time(timelog)),
|
||||
reply_markup=InlineKeyboardMarkup(buttons),
|
||||
)
|
||||
await msg.wait_for_click(from_user_id=ctx.from_user.id, timeout=30)
|
||||
except ListenerTimeout:
|
||||
await msg.edit_msg(strings("exp_task", context="general"))
|
||||
except Exception:
|
||||
await pesan.edit_msg(strings("fail_extr_media"))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue