Skip to main content

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

NameTypeRequiredDescription
BotInputUserClassyesThe bot to query
PeerInputPeerClassyesThe currently opened chat
GeoPointInputGeoPointClassThe geolocation, if requested
QuerystringyesThe query
OffsetstringyesThe offset within the results, will be passed directly as-is to the bot.

Returns

*MessagesBotResults

Possible errors

CodeTypeDescription
400BOT_INLINE_DISABLEDThis bot can't be used in inline mode.
400BOT_INVALIDThis is not a valid bot.
400BOT_RESPONSE_TIMEOUTA timeout occurred while fetching data from the bot.
400CHANNEL_INVALIDThe provided channel is invalid.
406CHANNEL_PRIVATEYou haven't joined this channel/supergroup.
400INPUT_USER_DEACTIVATEDThe specified user was deleted.
400MSG_ID_INVALIDInvalid message ID provided.

References