Registers a callback function to be notified when new message arrives after `message`. Warning: In case `callback` as lambda function, saving next step handlers will not work. :param message: The message for which we want to handle new message in the same chat. :ty
(self, message: types.Message, callback: Callable, *args, **kwargs)
| 8543 | |
| 8544 | |
| 8545 | def register_next_step_handler(self, message: types.Message, callback: Callable, *args, **kwargs) -> None: |
| 8546 | """ |
| 8547 | Registers a callback function to be notified when new message arrives after `message`. |
| 8548 | |
| 8549 | Warning: In case `callback` as lambda function, saving next step handlers will not work. |
| 8550 | |
| 8551 | :param message: The message for which we want to handle new message in the same chat. |
| 8552 | :type message: :class:`telebot.types.Message` |
| 8553 | |
| 8554 | :param callback: The callback function which next new message arrives. |
| 8555 | :type callback: :obj:`Callable[[telebot.types.Message], None]` |
| 8556 | |
| 8557 | :param args: Args to pass in callback func |
| 8558 | |
| 8559 | :param kwargs: Args to pass in callback func |
| 8560 | |
| 8561 | :return: None |
| 8562 | """ |
| 8563 | self.register_next_step_handler_by_chat_id(message.chat.id, callback, *args, **kwargs) |
| 8564 | |
| 8565 | |
| 8566 | def setup_middleware(self, middleware: BaseMiddleware): |
no test coverage detected