P
P
Python Newbie2021-10-21 16:16:38
Python
Python Newbie, 2021-10-21 16:16:38

How to pass multiple parameters to register_next_step_handler(message, my_func) on pytelegrambotapi?

Hello, please help: how can I pass several parameters to register_next_step_handler(message, my_func)? For example message and password. pytelegrambotapi framework

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
soremix, 2021-10-21
@Levman5

register_next_step_handler(message, my_func, password)

source:
def register_next_step_handler(
            self, message: types.Message, callback: Callable, *args, **kwargs) -> None:
        """
        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.
        :param callback:    The callback function which next new message arrives.
        :param args:        Args to pass in callback func
        :param kwargs:      Args to pass in callback func
        """

https://github.com/eternnoir/pyTelegramBotAPI/blob...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question