@@ -5564,7 +5564,7 @@ def create_invoice_link(self,
55645564
55655565 # noinspection PyShadowingBuiltins
55665566 def send_poll (
5567- self , chat_id : Union [int , str ], question : str , options : List [types .InputPollOption ],
5567+ self , chat_id : Union [int , str ], question : str , options : List [Union [ str , types .InputPollOption ] ],
55685568 is_anonymous : Optional [bool ]= None , type : Optional [str ]= None ,
55695569 allows_multiple_answers : Optional [bool ]= None ,
55705570 correct_option_id : Optional [int ]= None ,
@@ -5600,7 +5600,7 @@ def send_poll(
56005600 :type question: :obj:`str`
56015601
56025602 :param options: A JSON-serialized list of 2-10 answer options
5603- :type options: :obj:`list` of :obj:`InputPollOption`
5603+ :type options: :obj:`list` of :obj:`InputPollOption` | :obj:`list` of :obj:`str`
56045604
56055605 :param is_anonymous: True, if the poll needs to be anonymous, defaults to True
56065606 :type is_anonymous: :obj:`bool`
@@ -7578,9 +7578,8 @@ def set_state(self, user_id: int, state: Union[str, State], chat_id: Optional[in
75787578 chat_id = user_id
75797579 if bot_id is None :
75807580 bot_id = self .bot_id
7581- return self .current_states .set_state (
7582- chat_id = chat_id , user_id = user_id , state = state , bot_id = bot_id ,
7583- business_connection_id = business_connection_id , message_thread_id = message_thread_id )
7581+ return self .current_states .set_state (chat_id , user_id , state ,
7582+ bot_id = bot_id , business_connection_id = business_connection_id , message_thread_id = message_thread_id )
75847583
75857584
75867585 def reset_data (self , user_id : int , chat_id : Optional [int ]= None ,
@@ -7611,8 +7610,8 @@ def reset_data(self, user_id: int, chat_id: Optional[int]=None,
76117610 chat_id = user_id
76127611 if bot_id is None :
76137612 bot_id = self .bot_id
7614- return self .current_states .reset_data (chat_id = chat_id , user_id = user_id , bot_id = bot_id ,
7615- business_connection_id = business_connection_id , message_thread_id = message_thread_id )
7613+ return self .current_states .reset_data (chat_id , user_id ,
7614+ bot_id = bot_id , business_connection_id = business_connection_id , message_thread_id = message_thread_id )
76167615
76177616
76187617 def delete_state (self , user_id : int , chat_id : Optional [int ]= None , business_connection_id : Optional [str ]= None ,
@@ -7630,15 +7629,24 @@ def delete_state(self, user_id: int, chat_id: Optional[int]=None, business_conne
76307629 :param chat_id: Chat's identifier
76317630 :type chat_id: :obj:`int`
76327631
7632+ :param bot_id: Bot's identifier, defaults to current bot id
7633+ :type bot_id: :obj:`int`
7634+
7635+ :param business_connection_id: Business identifier
7636+ :type business_connection_id: :obj:`str`
7637+
7638+ :param message_thread_id: Identifier of the message thread
7639+ :type message_thread_id: :obj:`int`
7640+
76337641 :return: True on success
76347642 :rtype: :obj:`bool`
76357643 """
76367644 if chat_id is None :
76377645 chat_id = user_id
76387646 if bot_id is None :
76397647 bot_id = self .bot_id
7640- return self .current_states .delete_state (chat_id = chat_id , user_id = user_id , bot_id = bot_id ,
7641- business_connection_id = business_connection_id , message_thread_id = message_thread_id )
7648+ return self .current_states .delete_state (chat_id , user_id ,
7649+ bot_id = bot_id , business_connection_id = business_connection_id , message_thread_id = message_thread_id )
76427650
76437651
76447652 def retrieve_data (self , user_id : int , chat_id : Optional [int ]= None , business_connection_id : Optional [str ]= None ,
@@ -7668,9 +7676,8 @@ def retrieve_data(self, user_id: int, chat_id: Optional[int]=None, business_conn
76687676 chat_id = user_id
76697677 if bot_id is None :
76707678 bot_id = self .bot_id
7671- return self .current_states .get_interactive_data (chat_id = chat_id , user_id = user_id , bot_id = bot_id ,
7672- business_connection_id = business_connection_id ,
7673- message_thread_id = message_thread_id )
7679+ return self .current_states .get_interactive_data (chat_id , user_id ,
7680+ bot_id = bot_id , business_connection_id = business_connection_id , message_thread_id = message_thread_id )
76747681
76757682
76767683 def get_state (self , user_id : int , chat_id : Optional [int ]= None ,
@@ -7707,8 +7714,8 @@ def get_state(self, user_id: int, chat_id: Optional[int]=None,
77077714 chat_id = user_id
77087715 if bot_id is None :
77097716 bot_id = self .bot_id
7710- return self .current_states .get_state (chat_id = chat_id , user_id = user_id , bot_id = bot_id ,
7711- business_connection_id = business_connection_id , message_thread_id = message_thread_id )
7717+ return self .current_states .get_state (chat_id , user_id ,
7718+ bot_id = bot_id , business_connection_id = business_connection_id , message_thread_id = message_thread_id )
77127719
77137720
77147721 def add_data (self , user_id : int , chat_id : Optional [int ]= None ,
@@ -7742,8 +7749,8 @@ def add_data(self, user_id: int, chat_id: Optional[int]=None,
77427749 if bot_id is None :
77437750 bot_id = self .bot_id
77447751 for key , value in kwargs .items ():
7745- self .current_states .set_data (chat_id = chat_id , user_id = user_id , key = key , value = value , bot_id = bot_id ,
7746- business_connection_id = business_connection_id , message_thread_id = message_thread_id )
7752+ self .current_states .set_data (chat_id , user_id , key , value ,
7753+ bot_id = bot_id , business_connection_id = business_connection_id , message_thread_id = message_thread_id )
77477754
77487755
77497756 def register_next_step_handler_by_chat_id (
@@ -9848,4 +9855,3 @@ def _notify_command_handlers(self, handlers, new_messages, update_type):
98489855 handlers = handlers ,
98499856 middlewares = middlewares ,
98509857 update_type = update_type )
9851-
0 commit comments