// Type definitions for node-telegram-bot-api 0.27 // Project: https://github.com/yagop/node-telegram-bot-api // Definitions by: Alex Muench // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.1 declare class TelegramBot { constructor(token: string, opts?: any); startPolling(options?: any): Promise; initPolling(options?: any): Promise; stopPolling(): Promise; isPolling(): boolean; openWebHook(): Promise; closeWebHook(): Promise; hasOpenWebHook(): boolean; getMe(): Promise; setWebHook(url: string, options?: any): Promise; deleteWebHook(): Promise; getWebHookInfo(): Promise; getUpdates(options?: any): Promise; processUpdate(update: any): void; sendMessage(chatId: number | string, text: string, options?: any): Promise; answerInlineQuery(inlineQueryId: string, results: any[], options?: any): Promise; forwardMessage(chatId: number | string, fromChatId: number | string, messageId: number | string, options?: any): Promise; sendPhoto(chatId: number | string, photo: any, options?: any): Promise; sendAudio(chatId: number | string, audio: any, options?: any): Promise; sendDocument(chatId: number | string, doc: any, options?: any, fileOpts?: any): Promise; sendSticker(chatId: number | string, sticker: any, options?: any): Promise; sendVideo(chatId: number | string, video: any, options?: any): Promise; sendVoice(chatId: number | string, voice: any, options?: any): Promise; sendChatAction(chatId: number | string, action: string): Promise; kickChatMember(chatId: number | string, userId: string): Promise; unbanChatMember(chatId: number | string, userId: string): Promise; answerCallbackQuery(callbackQueryId: number | string, text: string, showAlert: boolean, options?: any): Promise; editMessageText(text: string, options?: any): Promise; editMessageCaption(caption: string, options?: any): Promise; editMessageReplyMarkup(replyMarkup: any, options?: any): Promise; getUserProfilePhotos(userId: string, options?: any): Promise; sendLocation(chatId: number | string, latitude: number, longitude: number, options?: any): Promise; sendVenue(chatId: number | string, latitude: number, longitude: number, title: string, address: string, options?: any): Promise; sendContact(chatId: number | string, phoneNumber: string, firstName: string, options?: any): Promise; getFile(fileId: string): Promise; getFileLink(fileId: string): Promise; downloadFile(fileId: string, downloadDir: string): Promise; onText(regexp: any, callback: ((msg: any, match: any[]) => void)): void; onReplyToMessage(chatId: number | string, messageId: number | string, callback: ((msg: any) => void)): number; removeReplyListener(replyListenerId: number): any; getChat(chatId: number | string): Promise; getChatAdministrators(chatId: number | string): Promise; getChatMembersCount(chatId: number | string): Promise; getChatMember(chatId: number | string, userId: string): Promise; leaveChat(chatId: number | string): Promise; sendGame(chatId: number | string, gameShortName: string, options?: any): Promise; setGameScore(userId: string, score: number, options?: any): Promise; getGameHighScores(userId: string, options?: any): Promise; } export = TelegramBot;