Skip to main content
Module

x/grammy_menu/mod.ts>MenuRange#switchInlineCurrent

Easily create interactive menus with grammY.
Go to Latest
method MenuRange.prototype.switchInlineCurrent
import { MenuRange } from "https://deno.land/x/grammy_menu@v1.1.2/mod.ts";

Adds a new inline query button that acts on the current chat. The selected chat will be prefilled with the name of your bot. You may provide a text that is specified along with it. This will start an inline query.

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

// Listen for specifc query
bot.inlineQuery('my-query', ctx => { ... })
// Listen for any query
bot.on('inline_query', ctx => { ... })

Parameters

text: MaybeDynamicString<C>

The text to display

optional
query = [UNSUPPORTED]

The (optional) inline query string to prefill