2
0
mirror of https://github.com/yagop/node-telegram-bot-api synced 2025-08-30 13:58:27 +00:00

[docs] Mention auto-deletion of webhook during polling

This commit is contained in:
GochoMugo
2017-01-09 15:56:28 +03:00
parent 2a782fddbc
commit 4735518116
2 changed files with 3 additions and 2 deletions

View File

@@ -129,7 +129,7 @@ Emits `message` when a message arrives.
| --- | --- | --- | --- |
| token | <code>String</code> | | Bot Token |
| [options] | <code>Object</code> | | |
| [options.polling] | <code>Boolean</code> &#124; <code>Object</code> | <code>false</code> | Set true to enable polling or set options |
| [options.polling] | <code>Boolean</code> &#124; <code>Object</code> | <code>false</code> | Set true to enable polling or set options. If a WebHook has been set, it will be deleted automatically. |
| [options.polling.timeout] | <code>String</code> &#124; <code>Number</code> | <code>10</code> | Timeout in seconds for long polling |
| [options.polling.interval] | <code>String</code> &#124; <code>Number</code> | <code>300</code> | Interval between requests in miliseconds |
| [options.polling.autoStart] | <code>Boolean</code> | <code>true</code> | Start polling immediately |

View File

@@ -41,7 +41,8 @@ class TelegramBot extends EventEmitter {
* @constructor
* @param {String} token Bot Token
* @param {Object} [options]
* @param {Boolean|Object} [options.polling=false] Set true to enable polling or set options
* @param {Boolean|Object} [options.polling=false] Set true to enable polling or set options.
* If a WebHook has been set, it will be deleted automatically.
* @param {String|Number} [options.polling.timeout=10] Timeout in seconds for long polling
* @param {String|Number} [options.polling.interval=300] Interval between requests in miliseconds
* @param {Boolean} [options.polling.autoStart=true] Start polling immediately