Skip to main content
Deno 2 is finally here 🎉️
Learn more
Very Popular
Go to Latest
method InlineKeyboard.switchInlineChosen
import { InlineKeyboard } from "https://deno.land/x/grammy@v1.17.1/convenience/keyboard.ts";

Creates a new inline query button. Telegram clients will let the user pick a chat when this button is pressed. This will start an inline query. The selected chat will be prefilled with the name of your bot. You may provide a text that is specified along with it.

Your bot will in turn receive updates for inline queries. You can listen to inline query updates like this:

bot.on('inline_query', ctx => { ... })

Parameters

text: string

The text to display

optional
query: SwitchInlineQueryChosenChat = [UNSUPPORTED]

The query object describing which chats can be picked

Returns

InlineKeyboardButton.SwitchInlineChosenChatButton