Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client.ask #42

Open
2 tasks done
irolz opened this issue Jun 12, 2024 · 2 comments
Open
2 tasks done

Client.ask #42

irolz opened this issue Jun 12, 2024 · 2 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@irolz
Copy link

irolz commented Jun 12, 2024

Checklist

  • I believe the idea is awesome and would benefit the framework
  • I have searched in the issue tracker for similar requests, including closed ones

Description

I would like to propose a new feature. The feature is called ask, which will function as a listener with a timeout mechanism. This command is intended to improve interaction by waiting for a user response within a specified time limit. If no response is received within the allotted time, the process can continue with a default action or timeout behavior.

reply_command = (await client.ask(message.chat.id, timeout=90)).text

@irolz irolz added the enhancement New feature or request label Jun 12, 2024
@SpEcHiDe SpEcHiDe added documentation Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed labels Jun 12, 2024
@irolz
Copy link
Author

irolz commented Jun 13, 2024

can use https://github.com/Snowball-01/pyropatch or https://pyrofork.mayuri.my.id/main/api/methods/ask.html support it.

@fivepe Thank you for the suggestions. I would like to use just one library, so I will wait until this feature is added to pyrotgfork.

@anasty17
Copy link

I like to suggest removing the workers limit and make it like telethon new task on each handler update so we can access the handler groups list without deadlock and sure by keeping lock for adding and removing handler .. so any user can add or remove handler from handler callback manually

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants