get_inline_bot_results()¶
- Client.get_inline_bot_results()¶
Get bot results via inline queries. You can then send a result using
send_inline_bot_result().Usable by Users Bots
- Parameters:¶
bot (``int`` | ``str``) – Unique identifier of the inline bot you want to get results from. You can specify a @username (str) or a bot ID (int).
query (``str``, *optional*) – Text of the query (up to 512 characters). Defaults to “” (empty string).
offset (``str``, *optional*) – Offset of the results to be returned.
latitude (``float``, *optional*) – Latitude of the location. Useful for location-based results only.
longitude (``float``, *optional*) – Longitude of the location. Useful for location-based results only.
chat_id (``int`` | ``str``) – Unique identifier (int) or username (str) of the target chat. For your personal cloud (Saved Messages) you can simply use “me” or “self”. For a contact that exists in your Telegram address book you can use his phone number (str).
- Returns:¶
:obj:`BotResults <pyrogram.api.types.messages.BotResults>` (On Success.)
- Raises:¶
TimeoutError – In case the bot fails to answer within 10 seconds.:
RPCError –
Example
results = await app.get_inline_bot_results("pyrogrambot") print(results)