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
| Name | Type | Required | Description |
|---|---|---|---|
QueryID | int64 | yes | Unique identifier for the query to be answered |
Error | string | — | Error 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 | []ShippingOption | — | A vector of available shipping options. |
Returns
bool
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | QUERY_ID_INVALID | The query ID is invalid. |
| 400 | USER_BOT_REQUIRED | This method can only be called by a bot. |
References
- Official documentation
- Generated Go reference
- TL definition:
messages.setBotShippingResults#e5f672fa