style: lint code
lint code on files: index.js, poll.js and argument-parser.js
This commit is contained in:
@ -49,7 +49,9 @@ function argumentParser(format, string) {
|
||||
string = string.replace(/[^\s]+/, '').trim();
|
||||
format = format.replace(/[^\s]+/, '').trim();
|
||||
|
||||
if (!format) return { args: {}, params: {} };
|
||||
if (!format) {
|
||||
return { args: {}, params: {} };
|
||||
}
|
||||
|
||||
var indexes = [],
|
||||
params = {};
|
||||
@ -77,7 +79,9 @@ function argumentParser(format, string) {
|
||||
return getFormat(null, 'rest');
|
||||
});
|
||||
|
||||
if (!string) return { args: {}, params: params };
|
||||
if (!string) {
|
||||
return { args: {}, params: params };
|
||||
}
|
||||
|
||||
indexes = indexes.sort(function (a, b) {
|
||||
return a.offset < b.offset ? -1 : 1;
|
||||
|
@ -11,7 +11,9 @@ function poll(bot) {
|
||||
}
|
||||
bot.emit('update', response.result);
|
||||
|
||||
if (bot._stop) return null;
|
||||
if (bot._stop) {
|
||||
return null;
|
||||
}
|
||||
return poll(bot);
|
||||
});
|
||||
}
|
||||
|
@ -69,8 +69,6 @@ var DEFAULTS = {
|
||||
|
||||
var REQUIRED = 0;
|
||||
|
||||
console.log(_poll2.default);
|
||||
|
||||
/**
|
||||
* Bot class used to connect to a new bot
|
||||
* Bots have an api property which gives access to all Telegram API methods,
|
||||
|
Reference in New Issue
Block a user