From 152710505fcbd3b77b422d696fe293748124bcaa Mon Sep 17 00:00:00 2001 From: brandly Date: Sun, 18 Oct 2015 13:49:41 -0400 Subject: [PATCH] allow 0ms for polling interval --- src/telegramPolling.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/telegramPolling.js b/src/telegramPolling.js index 97d3ec9..9461a4f 100644 --- a/src/telegramPolling.js +++ b/src/telegramPolling.js @@ -17,7 +17,7 @@ var TelegramBotPolling = function (token, options, callback) { this.token = token; this.callback = callback; this.timeout = options.timeout || 0; - this.interval = options.interval || 2000; + this.interval = (typeof options.interval === 'number') ? options.interval : 2000; this.lastUpdate = 0; this.lastRequest = null; this.abort = false;