1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Merge pull request #1823 from Badiboy/master

Fixed register_next_step_handler_by_chat_id chat_id description
This commit is contained in:
Badiboy 2022-12-03 00:01:57 +03:00 committed by GitHub
commit 109ae69f27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4981,14 +4981,14 @@ class TeleBot:
self.current_states.set_data(chat_id, user_id, key, value)
def register_next_step_handler_by_chat_id(
self, chat_id: Union[int, str], callback: Callable, *args, **kwargs) -> None:
self, chat_id: int, callback: Callable, *args, **kwargs) -> None:
"""
Registers a callback function to be notified when new message arrives after `message`.
Registers a callback function to be notified when new message arrives in the given chat.
Warning: In case `callback` as lambda function, saving next step handlers will not work.
:param chat_id: The chat for which we want to handle new message.
:type chat_id: :obj:`int` or :obj:`str`
:param chat_id: The chat (chat ID) for which we want to handle new message.
:type chat_id: :obj:`int`
:param callback: The callback function which next new message arrives.
:type callback: :obj:`Callable[[telebot.types.Message], None]`