Skip to main content

messages.setBotShippingResults

If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the bot will receive an updateBotShippingQuery update. Use this method to reply to shipping queries.

func (c *Client) MessagesSetBotShippingResults(ctx context.Context, request *MessagesSetBotShippingResultsRequest) (bool, error)

Calling this method

client.Run(ctx, func(ctx context.Context) error {
api := client.API()

res, err := api.MessagesSetBotShippingResults(ctx, &tg.MessagesSetBotShippingResultsRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // bool
return nil
})

Parameters

NameTypeRequiredDescription
QueryIDint64yesUnique identifier for the query to be answered
ErrorstringError message in human readable form that explains why it is impossible to complete the order (e.g. "Sorry, delivery to your desired address is unavailable"). Telegram will display this message to the user.
ShippingOptions[]ShippingOptionA vector of available shipping options.

Returns

bool

Possible errors

CodeTypeDescription
400QUERY_ID_INVALIDThe query ID is invalid.
400USER_BOT_REQUIREDThis method can only be called by a bot.

References