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)
| 10124 | |
| 10125 | |
| 10126 | async def add_data(self, user_id: int, chat_id: Optional[int]=None, |
| 10127 | business_connection_id: Optional[str]=None, |
| 10128 | message_thread_id: Optional[int]=None, |
| 10129 | bot_id: Optional[int]=None, |
| 10130 | **kwargs) -> None: |
| 10131 | """ |
| 10132 | Add data to states. |
| 10133 | |
| 10134 | :param user_id: User's identifier |
| 10135 | :type user_id: :obj:`int` |
| 10136 | |
| 10137 | :param chat_id: Chat's identifier |
| 10138 | :type chat_id: :obj:`int` |
| 10139 | |
| 10140 | :param bot_id: Bot's identifier, defaults to current bot id |
| 10141 | :type bot_id: :obj:`int` |
| 10142 | |
| 10143 | :param business_connection_id: Business identifier |
| 10144 | :type business_connection_id: :obj:`str` |
| 10145 | |
| 10146 | :param message_thread_id: Identifier of the message thread |
| 10147 | :type message_thread_id: :obj:`int` |
| 10148 | |
| 10149 | :param kwargs: Data to add |
| 10150 | :return: None |
| 10151 | """ |
| 10152 | if chat_id is None: |
| 10153 | chat_id = user_id |
| 10154 | if bot_id is None: |
| 10155 | bot_id = self.bot_id |
| 10156 | for key, value in kwargs.items(): |
| 10157 | await self.current_states.set_data(chat_id, user_id, key, value, |
| 10158 | bot_id=bot_id, business_connection_id=business_connection_id, message_thread_id=message_thread_id) |