UNPKG

1.6 kBTypeScriptView Raw
1import { InlineKeyboardButton, KeyboardButton } from './core/types/typegram';
2declare type Hideable<B> = B & {
3 hide: boolean;
4};
5export declare function text(text: string, hide?: boolean): Hideable<KeyboardButton.CommonButton>;
6export declare function contactRequest(text: string, hide?: boolean): Hideable<KeyboardButton.RequestContactButton>;
7export declare function locationRequest(text: string, hide?: boolean): Hideable<KeyboardButton.RequestLocationButton>;
8export declare function pollRequest(text: string, type?: 'quiz' | 'regular', hide?: boolean): Hideable<KeyboardButton.RequestPollButton>;
9export declare function url(text: string, url: string, hide?: boolean): Hideable<InlineKeyboardButton.UrlButton>;
10export declare function callback(text: string, data: string, hide?: boolean): Hideable<InlineKeyboardButton.CallbackButton>;
11export declare function switchToChat(text: string, value: string, hide?: boolean): Hideable<InlineKeyboardButton.SwitchInlineButton>;
12export declare function switchToCurrentChat(text: string, value: string, hide?: boolean): Hideable<InlineKeyboardButton.SwitchInlineCurrentChatButton>;
13export declare function game(text: string, hide?: boolean): Hideable<InlineKeyboardButton.GameButton>;
14export declare function pay(text: string, hide?: boolean): Hideable<InlineKeyboardButton.PayButton>;
15export declare function login(text: string, url: string, opts?: {
16 forward_text?: string;
17 bot_username?: string;
18 request_write_access?: boolean;
19}, hide?: boolean): Hideable<InlineKeyboardButton.LoginButton>;
20export {};
21//# sourceMappingURL=button.d.ts.map
\No newline at end of file