Skip to main content
Module

x/grammy/mod.ts>Composer#chosenInlineResult

The Telegram Bot Framework.
Very Popular
Latest
method Composer.prototype.chosenInlineResult
import { Composer } from "https://deno.land/x/grammy@v1.22.4/mod.ts";

Registers middleware for the ChosenInlineResult by the given id or ids. ChosenInlineResult represents a result of an inline query that was chosen by the user and sent to their chat partner. Check out https://core.telegram.org/bots/api#choseninlineresult to read more about chosen inline results.

bot.chosenInlineResult('id', async ctx => {
  const id = ctx.result_id;
  // Your code
})

Parameters

resultId: MaybeArray<string | RegExp>

An id or array of ids

...middleware: Array<ChosenInlineResultMiddleware<C>>

The middleware to register

Returns

Composer<ChosenInlineResultContext<C>>