/** * MTKruto - Cross-runtime JavaScript library for building Telegram clients * Copyright (C) 2023-2026 Roj * * This file is part of MTKruto. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see . */ import { Api } from "../2_tl.js"; import { type ButtonStyle } from "./0_button_style.js"; import { type ChatAdministratorRights } from "./0_chat_administrator_rights.js"; /** @unlisted */ export interface _KeyboardButtonBase { text: string; style?: ButtonStyle; } /** @unlisted */ export interface KeyboardButtonText { type: "text"; text: string; style?: ButtonStyle; } /** @unlisted */ export interface KeyboardButtonRequestUser extends _KeyboardButtonBase { type: "requestUser"; requestId: number; isBot?: boolean; isPremium?: boolean; } /** @unlisted */ export interface KeyboardButtonRequestChat extends _KeyboardButtonBase { type: "requestChat"; requestId: number; isChannel: boolean; isForum?: boolean; hasUsername?: boolean; isOwner?: boolean; userAdministratorRights?: ChatAdministratorRights; botAdministratorRights?: ChatAdministratorRights; isBotMember?: boolean; } /** @unlisted */ export interface KeyboardButtonRequestContact extends _KeyboardButtonBase { type: "requestContact"; } /** @unlisted */ export interface KeyboardButtonRequestLocation extends _KeyboardButtonBase { type: "requestLocation"; } /** @unlisted */ export interface KeyboardButtonRequestPoll extends _KeyboardButtonBase { type: "requestPoll"; /** If a type is not specified, the user will be allowed to choose either type. */ pollType?: "regular" | "quiz"; } /** @unlisted */ export interface KeyboardButtonMiniApp extends _KeyboardButtonBase { type: "miniApp"; /** An HTTPS URL of the mini app to be opened with additional data. */ url: string; } /** A button of a custom keyboard. */ export type KeyboardButton = KeyboardButtonText | KeyboardButtonRequestUser | KeyboardButtonRequestChat | KeyboardButtonRequestContact | KeyboardButtonRequestLocation | KeyboardButtonRequestPoll | KeyboardButtonMiniApp; export declare function constructKeyboardButton(button_: Api.KeyboardButton): KeyboardButton; export declare function keyboardButtonToTlObject(button: KeyboardButton): Api.KeyboardButton; //# sourceMappingURL=1_keyboard_button.d.ts.map