@@ -26,7 +26,8 @@ def get_inline_bot_results(self,
2626 bot : int or str ,
2727 query : str ,
2828 offset : str = "" ,
29- location : tuple = None ):
29+ latitude : float = None ,
30+ longitude : float = None ):
3031 """Use this method to get bot results via inline queries.
3132 You can then send a result using :obj:`send_inline_bot_result <pyrogram.Client.send_inline_bot_result>`
3233
@@ -38,11 +39,15 @@ def get_inline_bot_results(self,
3839 query (``str``):
3940 Text of the query (up to 512 characters).
4041
41- offset (``str``):
42+ offset (``str``, *optional* ):
4243 Offset of the results to be returned.
4344
44- location (``tuple``, *optional*):
45- Your location in tuple format (latitude, longitude), e.g.: (51.500729, -0.124583).
45+ latitude (``float``, *optional*):
46+ Latitude of the location.
47+ Useful for location-based results only.
48+
49+ longitude (``float``, *optional*):
50+ Longitude of the location.
4651 Useful for location-based results only.
4752
4853 Returns:
@@ -52,7 +57,7 @@ def get_inline_bot_results(self,
5257 :class:`Error <pyrogram.Error>`
5358 ``TimeoutError``: If the bot fails to answer within 10 seconds
5459 """
55- # TODO: Split location parameter into lat and long
60+ # TODO: Don't return the raw type
5661
5762 try :
5863 return self .send (
@@ -62,9 +67,9 @@ def get_inline_bot_results(self,
6267 query = query ,
6368 offset = offset ,
6469 geo_point = types .InputGeoPoint (
65- lat = location [ 0 ] ,
66- long = location [ 1 ]
67- ) if location else None
70+ lat = latitude ,
71+ long = longitude
72+ ) if ( latitude is not None and longitude is not None ) else None
6873 )
6974 )
7075 except UnknownError as e :
0 commit comments