tgb
Advanced tools
Comparing version 0.5.0 to 0.5.1
{ | ||
"name": "tgb", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"description": "The best choice for your Telegram Bots", | ||
@@ -5,0 +5,0 @@ "homepage": "https://666.io", |
@@ -67,4 +67,4 @@ //----------------------------------------------------- | ||
function client(token, method, data, proxy) { | ||
let resolve, | ||
reject; | ||
let resolve; | ||
let reject; | ||
@@ -71,0 +71,0 @@ //-------]> |
@@ -8,5 +8,5 @@ //----------------------------------------------------- | ||
const { | ||
cbNoop | ||
} = require("./../tools"); | ||
const _watchDog = (e) => { | ||
throw e; | ||
}; | ||
@@ -17,2 +17,4 @@ //----------------------------------------------------- | ||
return Object.assign({ | ||
_watchDog, | ||
start() {}, | ||
@@ -22,3 +24,8 @@ stop() {}, | ||
catch(callback) { | ||
this._watchDog = typeof(callback) === "function" ? callback : cbNoop; | ||
if(typeof(callback) !== "function") { | ||
throw new Error("Not a function"); | ||
} | ||
this._watchDog = callback; | ||
return this; | ||
@@ -25,0 +32,0 @@ } |
91197
2304