@@ -30,7 +30,9 @@ async def get_inline_bot_results(
3030 query : str = "" ,
3131 offset : str = "" ,
3232 latitude : float = None ,
33- longitude : float = None
33+ longitude : float = None ,
34+ # TODO: fix inconsistency
35+ chat_id : Union [int , str ] = None ,
3436 ):
3537 """Get bot results via inline queries.
3638 You can then send a result using :meth:`~pyrogram.Client.send_inline_bot_result`
@@ -57,6 +59,11 @@ async def get_inline_bot_results(
5759 Longitude of the location.
5860 Useful for location-based results only.
5961
62+ chat_id (``int`` | ``str``):
63+ Unique identifier (int) or username (str) of the target chat.
64+ For your personal cloud (Saved Messages) you can simply use "me" or "self".
65+ For a contact that exists in your Telegram address book you can use his phone number (str).
66+
6067 Returns:
6168 :obj:`BotResults <pyrogram.api.types.messages.BotResults>`: On Success.
6269
@@ -75,7 +82,7 @@ async def get_inline_bot_results(
7582 return await self .invoke (
7683 raw .functions .messages .GetInlineBotResults (
7784 bot = await self .resolve_peer (bot ),
78- peer = raw .types .InputPeerSelf (),
85+ peer = await self . resolve_peer ( chat_id ) if chat_id else raw .types .InputPeerSelf (),
7986 query = query ,
8087 offset = offset ,
8188 geo_point = raw .types .InputGeoPoint (
0 commit comments