Skip to content

Commit

Permalink
Revert callback timeout
Browse files Browse the repository at this point in the history
Signed-off-by: Yasir Aris M <git@yasirdev.my.id>
  • Loading branch information
yasirarism authored Dec 31, 2023
1 parent 3b930e5 commit 8ef27ee
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions misskaty/plugins/imdb_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,12 @@ async def imdb_choose(_, ctx: Message):
)
buttons.row(InlineButton("🚩 Set Default Language", f"imdbset#{ctx.from_user.id}"))
buttons.row(InlineButton("❌ Close", f"close#{ctx.from_user.id}"))
while 1:
cl = await ctx.reply_photo(
"https://img.yasirweb.eu.org/file/270955ef0d1a8a16831a9.jpg",
caption=f"Hi {ctx.from_user.mention}, Please select the language you want to use on IMDB Search. If you want use default lang for every user, click third button. So no need click select lang if use CMD.\n\nTimeout: 10s",
reply_markup=buttons,
quote=True,
)
try:
await cl.wait_for_click(ctx.from_user.id, timeout=10)
except ListenerTimeout:
await cl.edit("Task Timeout")
break
await ctx.reply_photo(
"https://img.yasirweb.eu.org/file/270955ef0d1a8a16831a9.jpg",
caption=f"Hi {ctx.from_user.mention}, Please select the language you want to use on IMDB Search. If you want use default lang for every user, click third button. So no need click select lang if use CMD.\n\nTimeout: 10s",
reply_markup=buttons,
quote=True,
)


@app.on_cb("imdbset")
Expand Down

0 comments on commit 8ef27ee

Please sign in to comment.