Beispiel #1
0
 def answer_inline_query(self,
                         inline_query_id,
                         results,
                         cache_time=None,
                         is_personal=None,
                         next_offset=None,
                         switch_pm_text=None,
                         switch_pm_parameter=None):
     """
     Use this method to send answers to an inline query. On success, True is returned.
     No more than 50 results per query are allowed.
     :param inline_query_id: Unique identifier for the answered query
     :param results: Array of results for the inline query
     :param cache_time: The maximum amount of time in seconds that the result of the inline query may be cached on the server.
     :param is_personal: Pass True, if results may be cached on the server side only for the user that sent the query.
     :param next_offset: Pass the offset that a client should send in the next query with the same text to receive more results.
     :param switch_pm_parameter: If passed, clients will display a button with specified text that switches the user
      to a private chat with the bot and sends the bot a start message with the parameter switch_pm_parameter
     :param switch_pm_text: 	Parameter for the start message sent to the bot when user presses the switch button
     :return: True means success.
     """
     return apihelper.answer_inline_query(self.token, inline_query_id,
                                          results, cache_time, is_personal,
                                          next_offset, switch_pm_text,
                                          switch_pm_parameter)
Beispiel #2
0
 def answer_inline_query(self, inline_query_id, results, cache_time=None, is_personal=None, next_offset=None):
     """
     Use this method to send answers to an inline query. On success, True is returned.
     No more than 50 results per query are allowed.
     :param inline_query_id: Unique identifier for the answered query
     :param results: Array of results for the inline query
     :param cache_time: The maximum amount of time in seconds that the result of the inline query may be cached on the server.
     :param is_personal: Pass True, if results may be cached on the server side only for the user that sent the query.
     :param next_offset: Pass the offset that a client should send in the next query with the same text to receive more results.
     :return: True means success.
     """
     return apihelper.answer_inline_query(self.token, inline_query_id, results, cache_time, is_personal, next_offset)
Beispiel #3
0
 def answer_inline_query(self, inline_query_id, results, cache_time=None, is_personal=None, next_offset=None,
                         switch_pm_text=None, switch_pm_parameter=None):
     """
     Use this method to send answers to an inline query. On success, True is returned.
     No more than 50 results per query are allowed.
     :param inline_query_id: Unique identifier for the answered query
     :param results: Array of results for the inline query
     :param cache_time: The maximum amount of time in seconds that the result of the inline query may be cached on the server.
     :param is_personal: Pass True, if results may be cached on the server side only for the user that sent the query.
     :param next_offset: Pass the offset that a client should send in the next query with the same text to receive more results.
     :param switch_pm_parameter: If passed, clients will display a button with specified text that switches the user
      to a private chat with the bot and sends the bot a start message with the parameter switch_pm_parameter
     :param switch_pm_text: 	Parameter for the start message sent to the bot when user presses the switch button
     :return: True means success.
     """
     return apihelper.answer_inline_query(self.token, inline_query_id, results, cache_time, is_personal, next_offset,
                                          switch_pm_text, switch_pm_parameter)
Beispiel #4
0
 def answer_inline_query(self,
                         inline_query_id,
                         results,
                         cache_time=None,
                         is_personal=None,
                         next_offset=None):
     """
     Use this method to send answers to an inline query. On success, True is returned.
     No more than 50 results per query are allowed.
     :param inline_query_id: Unique identifier for the answered query
     :param results: Array of results for the inline query
     :param cache_time: The maximum amount of time in seconds that the result of the inline query may be cached on the server.
     :param is_personal: Pass True, if results may be cached on the server side only for the user that sent the query.
     :param next_offset: Pass the offset that a client should send in the next query with the same text to receive more results.
     :return: True means success.
     """
     return apihelper.answer_inline_query(self.token, inline_query_id,
                                          results, cache_time, is_personal,
                                          next_offset)