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). You can also use bot profile link in form of t.me/<username> (str).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.
- Returns:¶
BotResults
– On Success.- Raises:¶
TimeoutError – In case the bot fails to answer within 10 seconds.
Example
results = await app.get_inline_bot_results("pyrogrambot") print(results)