@telegram-apps/sdk
Version:
TypeScript Source Development Kit for Telegram Mini Apps client application.
22 lines (21 loc) • 1.25 kB
TypeScript
import { SwitchInlineQueryChatType } from '@telegram-apps/bridge';
/**
* Inserts the bot's username and the specified inline query in the current chat's input field.
* Query may be empty, in which case only the bot's username will be inserted. The client prompts
* the user to choose a specific chat, then opens that chat and inserts the bot's username and
* the specified inline query in the input field.
* @param query - text which should be inserted in the input after the current bot name. Max
* length is 256 symbols.
* @param chatTypes - List of chat types which could be chosen to send the message. Could be an
* empty list.
* @since Mini Apps v6.7
* @throws {FunctionNotAvailableError} The function is not supported
* @throws {FunctionNotAvailableError} The environment is unknown
* @throws {FunctionNotAvailableError} The SDK is not initialized
* @throws {FunctionNotAvailableError} The application must be launched in the inline mode
* @example
* if (switchInlineQuery.isAvailable()) {
* switchInlineQuery('my query goes here', ['users']);
* }
*/
export declare const switchInlineQuery: import('../../wrappers/wrapSafe.js').SafeWrapped<(query: string, chatTypes?: SwitchInlineQueryChatType[]) => void, true, never>;