Returns context manager with data for a user in chat. :param user_id: User identifier :type user_id: int :param chat_id: Chat's unique identifier, defaults to user_id :type chat_id: int, optional :param bot_id: Bot's identifier, defaults to current
(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)
| 8703 | |
| 8704 | |
| 8705 | def retrieve_data(self, user_id: int, chat_id: Optional[int]=None, business_connection_id: Optional[str]=None, |
| 8706 | message_thread_id: Optional[int]=None, bot_id: Optional[int]=None) -> Optional[Dict[str, Any]]: |
| 8707 | """ |
| 8708 | Returns context manager with data for a user in chat. |
| 8709 | |
| 8710 | :param user_id: User identifier |
| 8711 | :type user_id: int |
| 8712 | |
| 8713 | :param chat_id: Chat's unique identifier, defaults to user_id |
| 8714 | :type chat_id: int, optional |
| 8715 | |
| 8716 | :param bot_id: Bot's identifier, defaults to current bot id |
| 8717 | :type bot_id: int, optional |
| 8718 | |
| 8719 | :param business_connection_id: Business identifier |
| 8720 | :type business_connection_id: str, optional |
| 8721 | |
| 8722 | :param message_thread_id: Identifier of the message thread |
| 8723 | :type message_thread_id: int, optional |
| 8724 | |
| 8725 | :return: Context manager with data for a user in chat |
| 8726 | :rtype: Optional[Any] |
| 8727 | """ |
| 8728 | if chat_id is None: |
| 8729 | chat_id = user_id |
| 8730 | if bot_id is None: |
| 8731 | bot_id = self.bot_id |
| 8732 | return self.current_states.get_interactive_data(chat_id, user_id, |
| 8733 | bot_id=bot_id, business_connection_id=business_connection_id, message_thread_id=message_thread_id) |
| 8734 | |
| 8735 | |
| 8736 | def get_state(self, user_id: int, chat_id: Optional[int]=None, |
no test coverage detected