diff --git a/types/node-telegram-bot-api/index.d.ts b/types/node-telegram-bot-api/index.d.ts index 9147eb3e1b..f6da99bdbc 100644 --- a/types/node-telegram-bot-api/index.d.ts +++ b/types/node-telegram-bot-api/index.d.ts @@ -6,6 +6,7 @@ // Kallu609 // XC-Zhang // AdityaThebe +// Michael Orlov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -143,10 +144,12 @@ declare namespace TelegramBot { } interface SendPhotoOptions extends SendBasicOptions { + parse_mode?: ParseMode; caption?: string; } interface SendAudioOptions extends SendBasicOptions { + parse_mode?: ParseMode; caption?: string; duration?: number; performer?: string; @@ -154,6 +157,7 @@ declare namespace TelegramBot { } interface SendDocumentOptions extends SendBasicOptions { + parse_mode?: ParseMode; caption?: string; } @@ -165,6 +169,7 @@ declare namespace TelegramBot { type SendStickerOptions = SendBasicOptions; interface SendVideoOptions extends SendBasicOptions { + parse_mode?: ParseMode; duration?: number; width?: number; height?: number; @@ -172,6 +177,7 @@ declare namespace TelegramBot { } interface SendVoiceOptions extends SendBasicOptions { + parse_mode?: ParseMode; caption?: string; duration?: number; } 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 61f1589f6f..dfb70be902 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 @@ -29,12 +29,17 @@ const res: TelegramBot.InlineQueryResultArticle = { MyTelegramBot.answerInlineQuery('queryId', [res, res, res], { is_personal: true }); MyTelegramBot.forwardMessage(1234, 5678, 'memberID', { disable_notification: true }); MyTelegramBot.sendPhoto(1234, 'photo/path', { caption: 'Foo' }); +MyTelegramBot.sendPhoto(1234, 'photo/path', { caption: 'Foo', parse_mode: 'HTML' }); MyTelegramBot.sendAudio(1234, 'audio/path', { caption: 'Foo' }); +MyTelegramBot.sendAudio(1234, 'audio/path', { caption: 'Foo', parse_mode: 'Markdown' }); MyTelegramBot.sendDocument(1234, 'doc/path', { caption: 'Foo' }, { fileOption: true }); +MyTelegramBot.sendDocument(1234, 'doc/path', { caption: 'Foo', parse_mode: 'HTML' }, { fileOption: true }); MyTelegramBot.sendSticker(1234, 'sticker/path', { reply_to_message_id: 5678 }); MyTelegramBot.sendVideo(1234, 'video/path', { caption: 'Foo' }); +MyTelegramBot.sendVideo(1234, 'video/path', { caption: 'Foo', parse_mode: 'MarkdownV2' }); MyTelegramBot.sendVideoNote(1234, 'video/path', { disable_notification: true }); MyTelegramBot.sendVoice(1234, 'voice/path', { caption: 'Foo' }); +MyTelegramBot.sendVoice(1234, 'voice/path', { caption: 'Foo', parse_mode: 'HTML' }); MyTelegramBot.sendChatAction(1234, 'typing'); MyTelegramBot.kickChatMember(1234, 'myUserID'); MyTelegramBot.unbanChatMember(1234, 'myUserID');