Layer 220
MessagesSetBotShippingResults
If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the bot will receive an update Bot Shipping Query update. Use this method to reply to shipping queries.
method
Bots
messages.setBotShippingResults#e5f672fa flags:# query_id:long error:flags.0?string shipping_options:flags.1?Vector<ShippingOption> = Bool;
Parameters
| Name | Type | Description |
|---|---|---|
| Flags | # | Flags, see TL conditional fields |
| QueryId | long | Unique identifier for the query to be answered |
| Error | flags.0?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 | Vector<ShippingOption> | A vector of available shipping options. |
Returns
BoolPossible 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. |
Gogram Example
// MessagesSetBotShippingResults - using Params struct result, err := client.MessagesSetBotShippingResults(&tg.MessagesSetBotShippingResultsParams{ QueryId: int64(0), // Optional fields: // Error: "...", // ShippingOptions: []tg.ShippingOption{&tg.ShippingOption{}}, }) if err != nil { // handle error } // result is *tg.Bool