From 0c18cda9224d2cb559496375e25e254fb80f1d5d Mon Sep 17 00:00:00 2001 From: GochoMugo Date: Wed, 11 Jan 2017 16:20:07 +0300 Subject: [PATCH] [docs] Fix undocumented return value for TelegramBot#setWebHook() --- README.md | 4 ++-- src/telegram.js | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 30afaba..f366b31 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ TelegramBot * [.closeWebHook()](#TelegramBot+closeWebHook) ⇒ Promise * [.hasOpenWebHook()](#TelegramBot+hasOpenWebHook) ⇒ Boolean * [.getMe()](#TelegramBot+getMe) ⇒ Promise - * [.setWebHook(url, [options])](#TelegramBot+setWebHook) + * [.setWebHook(url, [options])](#TelegramBot+setWebHook) ⇒ Promise * [.deleteWebHook()](#TelegramBot+deleteWebHook) ⇒ Promise * [.getWebHookInfo()](#TelegramBot+getWebHookInfo) ⇒ Promise * [.getUpdates([options])](#TelegramBot+getUpdates) ⇒ Promise @@ -216,7 +216,7 @@ Returns basic information about the bot in form of a `User` object. **See**: https://core.telegram.org/bots/api#getme -### telegramBot.setWebHook(url, [options]) +### telegramBot.setWebHook(url, [options]) ⇒ Promise Specify an url to receive incoming updates via an outgoing webHook. This method has an [older, compatible signature][setWebHook-v0.25.0] that is being deprecated. diff --git a/src/telegram.js b/src/telegram.js index 238587d..d7c2245 100644 --- a/src/telegram.js +++ b/src/telegram.js @@ -333,6 +333,7 @@ class TelegramBot extends EventEmitter { * delete webHook. * @param {Object} [options] Additional Telegram query options * @param {String|stream.Stream} [options.certificate] PEM certificate key (public). + * @return {Promise} * @see https://core.telegram.org/bots/api#setwebhook */ setWebHook(url, options = {}) {