Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/grammy/composer.ts>Composer#shippingQuery

The Telegram Bot Framework.
Very Popular
Go to Latest
method Composer.prototype.shippingQuery
import { Composer } from "https://deno.land/x/grammy@v1.25.2/composer.ts";

Registers middleware for shipping queries. If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, Telegram will send a shipping query to your bot whenever a user has confirmed their shipping details. You bot will then receive the shipping information and can respond with a confirmation of whether delivery to the specified address is possible. Check out https://core.telegram.org/bots/api#shippingquery to read more about shipping queries.

bot.shippingQuery('invoice_payload', async ctx => {
  // Answer the shipping query, confer https://core.telegram.org/bots/api#answershippingquery
  await ctx.answerShippingQuery( ... )
})

Parameters

trigger: MaybeArray<string | RegExp>

The string to look for in the invoice payload

...middleware: Array<ShippingQueryMiddleware<C>>

The middleware to register