diff --git a/types/node-telegram-bot-api/index.d.ts b/types/node-telegram-bot-api/index.d.ts index 6eeeabe3f2..f163f485be 100644 --- a/types/node-telegram-bot-api/index.d.ts +++ b/types/node-telegram-bot-api/index.d.ts @@ -69,7 +69,7 @@ declare class TelegramBot extends EventEmitter { sendGame(chatId: number | string, gameShortName: string, options?: any): Promise; setGameScore(userId: string, score: number, options?: any): Promise; getGameHighScores(userId: string, options?: any): Promise; - deleteMessage(chatId: string, messageId: string, options?: any): Promise; + deleteMessage(chatId: number | string, messageId: string, options?: any): Promise; sendInvoice(chatId: number | string, title: string, description: string, payload: string, providerToken: string, startParameter: string, currency: string, prices: any[], options?: any): Promise; answerShippingQuery(shippingQueryId: string, ok: boolean, options?: any): Promise; answerPreCheckoutQuery(preCheckoutQueryId: string, ok: boolean, options?: any): Promise; diff --git a/types/node-telegram-bot-api/node-telegram-bot-api-tests.ts b/types/node-telegram-bot-api/node-telegram-bot-api-tests.ts index 80b44216fb..70482a7b38 100644 --- a/types/node-telegram-bot-api/node-telegram-bot-api-tests.ts +++ b/types/node-telegram-bot-api/node-telegram-bot-api-tests.ts @@ -23,11 +23,21 @@ MyTelegramBot.sendAudio(1234, "audio/path", { foo: "bar" }); MyTelegramBot.sendDocument(1234, "doc/path", { foo: "bar" }, { fileOption: true }); MyTelegramBot.sendSticker(1234, "sticker/path", { foo: "bar" }); MyTelegramBot.sendVideo(1234, "video/path", { foo: "bar" }); +MyTelegramBot.sendVideoNote(1234, "video/path", { foo: "bar" }); MyTelegramBot.sendVoice(1234, "voice/path", { foo: "bar" }); MyTelegramBot.sendChatAction(1234, "ACTION!"); MyTelegramBot.kickChatMember(1234, "myUserID"); MyTelegramBot.unbanChatMember(1234, "myUserID"); -MyTelegramBot.answerCallbackQuery("myCallbackQueryID", "test-text", false, { foo: "bar" }); +MyTelegramBot.restrictChatMember(1234, 'myUserID', { foo: "bar" }); +MyTelegramBot.promoteChatMember(1234, 'myUserID', { foo: "bar" }); +MyTelegramBot.exportChatInviteLink(1234); +MyTelegramBot.sendChatPhoto(1234, "My/File/ID"); +MyTelegramBot.deleteChatPhoto(1234); +MyTelegramBot.setChatTitle(1234, 'Chat Title'); +MyTelegramBot.setChatDescription(1234, 'Chat Description'); +MyTelegramBot.pinChatMessage(1234, 'Pinned Message'); +MyTelegramBot.unpinChatMessage(1234); +MyTelegramBot.answerCallbackQuery({ foo: "bar" }); MyTelegramBot.editMessageText("test-text", { foo: "bar" }); MyTelegramBot.editMessageCaption("My Witty Caption", { foo: "bar" }); MyTelegramBot.editMessageReplyMarkup({ replyMarkup: "something" }, { foo: "bar" }); @@ -39,6 +49,7 @@ MyTelegramBot.getFile("My/File/ID"); MyTelegramBot.getFileLink("My/File/ID"); MyTelegramBot.downloadFile("My/File/ID", "mydownloaddir/"); MyTelegramBot.onText(/regex/, (msg, match) => { }); +MyTelegramBot.removeTextListener(/regex/); MyTelegramBot.onReplyToMessage(1234, "mymessageID", (msg) => { }); MyTelegramBot.removeReplyListener(5466); MyTelegramBot.getChat(1234); @@ -49,3 +60,7 @@ MyTelegramBot.leaveChat(1234); MyTelegramBot.sendGame(1234, "MygameName", { foo: "bar" }); MyTelegramBot.setGameScore("myUserID", 99, { foo: "bar" }); MyTelegramBot.getGameHighScores("myUserID", { foo: "bar" }); +MyTelegramBot.deleteMessage(1234, 'mymessageID', { foo: "bar" }); +MyTelegramBot.sendInvoice(1234, 'Invoice Title', 'Invoice Description', 'Invoice Payload', 'Providertoken', 'Startparameter', 'Currency', [1, 2, 4], { foo: "bar" }); +MyTelegramBot.answerShippingQuery('shippingQueryId', true, { foo: "bar" }); +MyTelegramBot.answerPreCheckoutQuery('preCheckoutQueryId', true, { foo: "bar" });