mirror of
https://github.com/yagop/node-telegram-bot-api
synced 2025-08-31 14:25:57 +00:00
src/telegram: Add sendVideoNote method (#330)
References: * API sendVideoNote method: https://core.telegram.org/bots/api#sendvideonote * PR: https://github.com/yagop/node-telegram-bot-api/pull/330 * PR-by: @kamikazechaser * API v3: https://github.com/yagop/node-telegram-bot-api/issues/332
This commit is contained in:
committed by
Gocho Mugo
parent
4653bb1b38
commit
942fc4854b
16
doc/api.md
16
doc/api.md
@@ -33,6 +33,7 @@ TelegramBot
|
||||
* [.sendDocument(chatId, doc, [options], [fileOpts])](#TelegramBot+sendDocument) ⇒ <code>Promise</code>
|
||||
* [.sendSticker(chatId, sticker, [options])](#TelegramBot+sendSticker) ⇒ <code>Promise</code>
|
||||
* [.sendVideo(chatId, video, [options])](#TelegramBot+sendVideo) ⇒ <code>Promise</code>
|
||||
* [.sendVideoNote(chatId, videoNote, [options])](#TelegramBot+sendVideoNote) ⇒ <code>Promise</code>
|
||||
* [.sendVoice(chatId, voice, [options])](#TelegramBot+sendVoice) ⇒ <code>Promise</code>
|
||||
* [.sendChatAction(chatId, action)](#TelegramBot+sendChatAction) ⇒ <code>Promise</code>
|
||||
* [.kickChatMember(chatId, userId)](#TelegramBot+kickChatMember) ⇒ <code>Promise</code>
|
||||
@@ -338,6 +339,21 @@ Use this method to send video files, Telegram clients support mp4 videos (other
|
||||
| video | <code>String</code> | <code>stream.Stream</code> | <code>Buffer</code> | A file path or Stream. Can also be a `file_id` previously uploaded. |
|
||||
| [options] | <code>Object</code> | Additional Telegram query options |
|
||||
|
||||
<a name="TelegramBot+sendVideoNote"></a>
|
||||
|
||||
### telegramBot.sendVideoNote(chatId, videoNote, [options]) ⇒ <code>Promise</code>
|
||||
Use this method to send rounded square videos of upto 1 minute long.
|
||||
|
||||
**Kind**: instance method of <code>[TelegramBot](#TelegramBot)</code>
|
||||
**Info**: The length parameter is actually optional. However, the API (at time of writing) requires you to always provide it until it is fixed.
|
||||
**See**: https://core.telegram.org/bots/api#sendvideonote
|
||||
|
||||
| Param | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| chatId | <code>Number</code> | <code>String</code> | Unique identifier for the message recipient |
|
||||
| videoNote | <code>String</code> | <code>stream.Stream</code> | <code>Buffer</code> | A file path or Stream. Can also be a `file_id` previously uploaded. |
|
||||
| [options] | <code>Object</code> | Additional Telegram query options |
|
||||
|
||||
<a name="TelegramBot+sendVoice"></a>
|
||||
|
||||
### telegramBot.sendVoice(chatId, voice, [options]) ⇒ <code>Promise</code>
|
||||
|
Reference in New Issue
Block a user