From a45b35453b738842f1c1aa74577de4ae794ea682 Mon Sep 17 00:00:00 2001 From: Ilias Ismanalijev Date: Mon, 6 Jul 2015 01:40:54 +0200 Subject: [PATCH] send chat action readme --- README.md | 16 ++++++++++++++++ src/telegram.js | 8 +++++--- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 27b4abb..7a4372e 100644 --- a/README.md +++ b/README.md @@ -135,3 +135,19 @@ See: https://core.telegram.org/bots/api#sendaudio ### Return: * **Promise** + + +## sendChatAction(chatId, action) + +Send chat action. Type of `action` to broadcast. `typing` for text messages, `upload_photo` for photos, `record_video` or `upload_video` for videos, `record_audio` or `upload_audio` for audio files, `upload_document` for general files, `find_location` for location data. + +See: https://core.telegram.org/bots/api#sendchataction + +### Params: + +* **Number|String** *chatId* Unique identifier for the message recipient +* **String|stream.Stream** *action* Type of action to broadcast. + +### Return: + +* **Promise** diff --git a/src/telegram.js b/src/telegram.js index 301a587..fc06d3d 100644 --- a/src/telegram.js +++ b/src/telegram.js @@ -296,12 +296,14 @@ TelegramBot.prototype.sendAudio = function (chatId, audio, options) { }; /** - * Send chat action - * @param {Number|String} chatId Unique identifier for the message recipient - * @param {String} action Type of action to broadcast. `typing` for text messages, + * Send chat action. + * `typing` for text messages, * `upload_photo` for photos, `record_video` or `upload_video` for videos, * `record_audio` or `upload_audio` for audio files, `upload_document` for general files, * `find_location` for location data. + * + * @param {Number|String} chatId Unique identifier for the message recipient + * @param {String} action Type of action to broadcast. * @return {Promise} * @see https://core.telegram.org/bots/api#sendchataction */