diff --git a/README.md b/README.md index 3e9ef4c..c108212 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ TelegramBot * [.getFileLink(fileId)](#TelegramBot+getFileLink) ⇒ Promise * [.downloadFile(fileId, downloadDir)](#TelegramBot+downloadFile) ⇒ Promise * [.onText(regexp, callback)](#TelegramBot+onText) - * [.onReplyToMessage(messageId, callback)](#TelegramBot+onReplyToMessage) + * [.onReplyToMessage(chatId, messageId, callback)](#TelegramBot+onReplyToMessage) ### new TelegramBot(token, [options]) @@ -90,7 +90,7 @@ Emits `message` when a message arrives. | token | String | | Bot Token | | [options] | Object | | | | [options.polling] | Boolean | Object | false | Set true to enable polling or set options | -| [options.polling.timeout] | String | Number | 4 | Polling time | +| [options.polling.timeout] | String | Number | 10 | Polling time in seconds | | [options.polling.interval] | String | Number | 2000 | Interval between requests in miliseconds | | [options.webHook] | Boolean | Object | false | Set true to enable WebHook or set options | | [options.webHook.key] | String | | PEM private key to webHook server. | @@ -343,14 +343,15 @@ Register a RegExp to test against an incomming text message. | callback | function | Callback will be called with 2 parameters, the `msg` and the result of executing `regexp.exec` on message text. | -### telegramBot.onReplyToMessage(messageId, callback) +### telegramBot.onReplyToMessage(chatId, messageId, callback) Register a reply to wait for a message response. **Kind**: instance method of [TelegramBot](#TelegramBot) | Param | Type | Description | | --- | --- | --- | -| messageId | Number | String | The ID of the message to be replied | +| chatId | Number | String | The chat id where the message cames from. | +| messageId | Number | String | The message id to be replied. | | callback | function | Callback will be called with the reply message. | * * *