messages.getInlineBotResults
Query an inline bot
func (c *Client) MessagesGetInlineBotResults(ctx context.Context, request *MessagesGetInlineBotResultsRequest) (*MessagesBotResults, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.MessagesGetInlineBotResults(ctx, &tg.MessagesGetInlineBotResultsRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // *MessagesBotResults
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Bot | InputUserClass | yes | The bot to query |
Peer | InputPeerClass | yes | The currently opened chat |
GeoPoint | InputGeoPointClass | — | The geolocation, if requested |
Query | string | yes | The query |
Offset | string | yes | The offset within the results, will be passed directly as-is to the bot. |
Returns
Possible 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. |
References
- Official documentation
- Generated Go reference
- TL definition:
messages.getInlineBotResults#514e999d