mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
[node-telegram-bot-api] Add parse_mode for files (#43839)
This commit is contained in:
parent
b2a5c56a28
commit
1a2229b7cb
6
types/node-telegram-bot-api/index.d.ts
vendored
6
types/node-telegram-bot-api/index.d.ts
vendored
@ -6,6 +6,7 @@
|
||||
// Kallu609 <https://github.com/Kallu609>
|
||||
// XC-Zhang <https://github.com/XC-Zhang>
|
||||
// AdityaThebe <https://github.com/adityathebe>
|
||||
// Michael Orlov <https://github.com/MiklerGM>
|
||||
// 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;
|
||||
}
|
||||
|
||||
@ -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');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user