Comparing version 0.5.3 to 0.6.0
{ | ||
"name": "tgb", | ||
"version": "0.5.3", | ||
"version": "0.6.0", | ||
"description": "The best choice for your Telegram Bots", | ||
@@ -5,0 +5,0 @@ "homepage": "https://666.io", |
@@ -62,3 +62,3 @@ [![Codacy Badge](https://api.codacy.com/project/badge/Grade/75f668078ddc40fca21c21fd06fe9823)](https://www.codacy.com/app/daeren/tgb?utm_source=github.com&utm_medium=referral&utm_content=Daeren/tgb&utm_campaign=Badge_Grade) | ||
// tgb.polling(token, onMsg(data, bot)).stop().start(); | ||
// tgb.polling(token, onMsg(data, bot)).stop().start().stopped; | ||
// tgb.polling(token, options{proxy, limit, timeout, interval}, onMsg(data, bot)); | ||
@@ -65,0 +65,0 @@ // tgb.polling(bot, onMsg(data)); |
@@ -170,3 +170,5 @@ //----------------------------------------------------- | ||
case "mediaGroup": { | ||
if(Array.isArray(input) && input.length || (input && typeof(input) === "object" && !Array.isArray(input))) { | ||
const inputIsArray = Array.isArray(input); | ||
if(inputIsArray && input.length || (input && typeof(input) === "object" && !inputIsArray)) { | ||
const files = []; | ||
@@ -221,3 +223,3 @@ | ||
forEachAsync(files, function(next, [name, v], i) { | ||
writeData(rawReq, name, input[i].type, v, next); | ||
writeData(rawReq, name, inputIsArray ? input[i].type : input.type, v, next); | ||
}, done); | ||
@@ -224,0 +226,0 @@ } |
@@ -0,0 +0,0 @@ //----------------------------------------------------- |
@@ -50,2 +50,4 @@ //----------------------------------------------------- | ||
const instance = baseSrv({ | ||
get stopped() { return stopped; }, | ||
start() { | ||
@@ -52,0 +54,0 @@ if(stopped) { |
@@ -0,0 +0,0 @@ //----------------------------------------------------- |
@@ -0,0 +0,0 @@ //----------------------------------------------------- |
92522
23
2297