Module

x/grammy/mod.ts>Composer#chosenInlineResult

The Telegram Bot Framework.
Very Popular
Go to Latest
method Composer.prototype.chosenInlineResult
import { Composer } from "https://dotland.deno.dev/x/grammy@v1.20.2/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>>