Add data to states. :param user_id: User's identifier :type user_id: :obj:`int` :param chat_id: Chat's identifier :type chat_id: :obj:`int` :param bot_id: Bot's identifier, defaults to current bot id :type bot_id: :obj:`int` :param
(self, user_id: int, chat_id: Optional[int]=None,
business_connection_id: Optional[str]=None,
message_thread_id: Optional[int]=None,
bot_id: Optional[int]=None,
**kwargs)
| 8772 | |
| 8773 | |
| 8774 | def add_data(self, user_id: int, chat_id: Optional[int]=None, |
| 8775 | business_connection_id: Optional[str]=None, |
| 8776 | message_thread_id: Optional[int]=None, |
| 8777 | bot_id: Optional[int]=None, |
| 8778 | **kwargs) -> None: |
| 8779 | """ |
| 8780 | Add data to states. |
| 8781 | |
| 8782 | :param user_id: User's identifier |
| 8783 | :type user_id: :obj:`int` |
| 8784 | |
| 8785 | :param chat_id: Chat's identifier |
| 8786 | :type chat_id: :obj:`int` |
| 8787 | |
| 8788 | :param bot_id: Bot's identifier, defaults to current bot id |
| 8789 | :type bot_id: :obj:`int` |
| 8790 | |
| 8791 | :param business_connection_id: Business identifier |
| 8792 | :type business_connection_id: :obj:`str` |
| 8793 | |
| 8794 | :param message_thread_id: Identifier of the message thread |
| 8795 | :type message_thread_id: :obj:`int` |
| 8796 | |
| 8797 | :param kwargs: Data to add |
| 8798 | :return: None |
| 8799 | """ |
| 8800 | if chat_id is None: |
| 8801 | chat_id = user_id |
| 8802 | if bot_id is None: |
| 8803 | bot_id = self.bot_id |
| 8804 | for key, value in kwargs.items(): |
| 8805 | self.current_states.set_data(chat_id, user_id, key, value, |
| 8806 | bot_id=bot_id, business_connection_id=business_connection_id, message_thread_id=message_thread_id) |
| 8807 | |
| 8808 | |
| 8809 | def register_next_step_handler_by_chat_id( |