From 959d7bfd2e7b98fe12c3c952b68314fc77c423d3 Mon Sep 17 00:00:00 2001 From: GochoMugo Date: Wed, 10 May 2017 09:02:44 +0300 Subject: [PATCH] doc: Update API Reference, fix minor typo --- doc/api.md | 15 +++++++++++++++ src/telegram.js | 3 +-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/doc/api.md b/doc/api.md index a5f7a68..062f8ba 100644 --- a/doc/api.md +++ b/doc/api.md @@ -60,6 +60,7 @@ TelegramBot * [.sendGame(chatId, gameShortName, [options])](#TelegramBot+sendGame) ⇒ Promise * [.setGameScore(userId, score, [options])](#TelegramBot+setGameScore) ⇒ Promise * [.getGameHighScores(userId, [options])](#TelegramBot+getGameHighScores) ⇒ Promise + * [.deleteMessage(chatId, messageId, [options])](#TelegramBot+deleteMessage) ⇒ Promise @@ -744,6 +745,20 @@ Use this method to get data for high score table. | userId | String | Unique identifier of the target user | | [options] | Object | Additional Telegram query options | + + +### telegramBot.deleteMessage(chatId, messageId, [options]) ⇒ Promise +Use this method to delete a message. + +**Kind**: instance method of [TelegramBot](#TelegramBot) +**See**: https://core.telegram.org/bots/api#deletemessage + +| Param | Type | Description | +| --- | --- | --- | +| chatId | String | Unique identifier of the target chat | +| messageId | String | Unique identifier of the target message | +| [options] | Object | Additional Telegram query options | + * * * diff --git a/src/telegram.js b/src/telegram.js index 3a85870..806d79e 100644 --- a/src/telegram.js +++ b/src/telegram.js @@ -1167,8 +1167,7 @@ class TelegramBot extends EventEmitter { form.user_id = userId; return this._request('getGameHighScores', { form }); } - - + /** * Use this method to delete a message. * @param {String} chatId Unique identifier of the target chat