eternnoir / pyTelegramBotAPI

Python Telegram bot api.
GNU General Public License v2.0
8.05k stars 2.02k forks source link

new: add register_next_step_handler for asyncbot #2344

Closed hiddify-com closed 2 months ago

hiddify-com commented 2 months ago

Description

create missing register_next_step_handler in asyncbot using auto state

Describe your tests

run step_example.py in async_telebot

Python version:

OS:

Checklist:

coder2020official commented 2 months ago

No

hiddify-com commented 2 months ago

why?

coder2020official commented 2 months ago
  1. Bad implementation
  2. No steps in async please
hiddify-com commented 2 months ago

It is based on your recommendation that suggest to use state

It is really useful to have steps in async

The step in sync is buggy also. It does not process middlewares.

coder2020official commented 2 months ago

Steps are an old, somewhat "deprecated"(though not yet and won't probably), so there's no point of improving them when there's a solution(states) which I am currently working on to even further improve

hiddify-com commented 2 months ago

the problem of state is that we can not have more complex workflow for example when we want to get 10 elements from user it is so hard to be implemented by state

coder2020official commented 2 months ago

What do you even mean by "10 elements"? 10 inputs? I am working on an easier solution, some class that will take care of this

hiddify-com commented 2 months ago

yes 10 inputs from the user

great thanks