Skip to main content
Deno 2 is finally here 🎉️
Learn more
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.32.0/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>>