diff --git a/src/telegramPolling.js b/src/telegramPolling.js index 2b155f1..db6b3ed 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 || 300; + this.interval = (typeof options.interval === 'number') ? options.interval : 300; this.lastUpdate = 0; this.lastRequest = null; this.abort = false;