messages.SetBotShippingResults

class pyrogram.raw.functions.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.

Details:
  • Layer: 223

  • ID: E5F672FA

Parameters:
  • query_id (int 64-bit) – Unique identifier for the query to be answered

  • error (str, optional) – 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.

  • shipping_options (List of ShippingOption, optional) – A vector of available shipping options.

Returns:

bool

TL Schema

messages.setBotShippingResults#e5f672fa
flags:#
query_id:long
error:flags.0?string
shipping_options:flags.1?Vector<ShippingOption>

= Bool

Parameter Tree

SetBotShippingResults
├── query_idlong
├── errorstring (optional)
└── shipping_optionsVector < ShippingOption > (optional)
└── ShippingOption
├── idstring
├── titlestring
└── pricesVector < LabeledPrice >
└── LabeledPrice
├── labelstring
└── amountlong

Example

await app.invoke(
    SetBotShippingResults(
        query_id=0,
        error="text",
        shipping_options=[
                ShippingOption(
                    id="text",
                    title="text",
                    prices=[
                            LabeledPrice(
                                label="text",
                                amount=0
                            )
                        ]
                )
            ],
    )
)