Updated tests.

This commit is contained in:
Martin Donkersloot
2017-08-17 20:24:30 +02:00
parent d4df9bedaf
commit 9324608ea4
2 changed files with 17 additions and 2 deletions
+1 -1
View File
@@ -69,7 +69,7 @@ declare class TelegramBot extends EventEmitter {
sendGame(chatId: number | string, gameShortName: string, options?: any): Promise<any>;
setGameScore(userId: string, score: number, options?: any): Promise<any>;
getGameHighScores(userId: string, options?: any): Promise<any>;
deleteMessage(chatId: string, messageId: string, options?: any): Promise<any>;
deleteMessage(chatId: number | string, messageId: string, options?: any): Promise<any>;
sendInvoice(chatId: number | string, title: string, description: string, payload: string, providerToken: string, startParameter: string, currency: string, prices: any[], options?: any): Promise<any>;
answerShippingQuery(shippingQueryId: string, ok: boolean, options?: any): Promise<any>;
answerPreCheckoutQuery(preCheckoutQueryId: string, ok: boolean, options?: any): Promise<any>;
@@ -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" });