Layer 220
MessagesGetInlineBotResults
Query an inline bot
method
Users
messages.getInlineBotResults#514e999d flags:# bot:InputUser peer:InputPeer geo_point:flags.0?InputGeoPoint query:string offset:string = messages.BotResults;
Parameters
| Name | Type | Description |
|---|---|---|
| Flags | # | Flags, see TL conditional fields |
| Bot | InputUser | The bot to query |
| Peer | InputPeer | The currently opened chat |
| GeoPoint | flags.0?InputGeoPoint | The geolocation, if requested |
| Query | string | The query |
| Offset | string | The offset within the results, will be passed directly as-is to the bot. |
Returns
messages.BotResultsPossible Errors
| Code | Type | Description |
|---|---|---|
| 400 | BOT_INLINE_DISABLED | This bot can't be used in inline mode. |
| 400 | BOT_INVALID | This is not a valid bot. |
| 400 | BOT_RESPONSE_TIMEOUT | A timeout occurred while fetching data from the bot. |
| 400 | CHANNEL_INVALID | The provided channel is invalid. |
| 406 | CHANNEL_PRIVATE | You haven't joined this channel/supergroup. |
| 400 | INPUT_USER_DEACTIVATED | The specified user was deleted. |
| 400 | MSG_ID_INVALID | Invalid message ID provided. |
| -503 | Timeout | Timeout while fetching data. |
Gogram Example
// MessagesGetInlineBotResults - using Params struct result, err := client.MessagesGetInlineBotResults(&tg.MessagesGetInlineBotResultsParams{ Bot: &tg.InputUserSelf{}, Peer: &tg.InputPeerUser{UserID: int64(123456789)}, Query: "...", Offset: "...", // Optional fields: // GeoPoint: &tg.InputGeoPoint{Lat: 0.0, Long: 0.0}, }) if err != nil { // handle error } // result is *tg.MessagesBotResults