UNPKG

vk-chat-bot

Version:

Package for easy creation of chat bots for VK communities (uses Callback API).

49 lines (48 loc) 1.15 kB
export declare class Keyboard { readonly one_time: boolean; readonly buttons: Button[][]; constructor(buttons?: Button[][], oneTime?: boolean); } export declare enum Color { Primary = "primary", Secondary = "secondary", Negative = "negative", Positive = "positive" } declare type Button = TextButton | LocationButton | VKPayButton | OpenAppButton; interface TextButton { action: { type: string; label: string; payload?: string; }; color: Color; } interface LocationButton { action: { type: string; payload?: string; }; } interface VKPayButton { action: { type: string; hash: string; }; } interface OpenAppButton { action: { type: string; app_id: number; label: string; hash: string; owner_id?: number; }; } export declare const button: { text(label?: string, color?: Color, payload?: any): TextButton; location(payload?: any): LocationButton; vkPay(hash: string): VKPayButton; openApp(appId: number, ownerId: number, label: string, hash: string): OpenAppButton; }; export {};