Fixes in code quality

pull/36/head
Trivernis 6 years ago
parent f2ef10bf08
commit bb1d952d18

@ -218,7 +218,7 @@ class Bot {
}); });
// returns the time the bot is running // returns the time the bot is running
cmd.createGlobalCommand(prefix , globcommands.info.uptime, () => { cmd.createGlobalCommand(prefix, globcommands.info.uptime, () => {
let uptime = utils.getSplitDuration(this.client.uptime); let uptime = utils.getSplitDuration(this.client.uptime);
return new Discord.RichEmbed().setDescription(` return new Discord.RichEmbed().setDescription(`
**${uptime.days}** days **${uptime.days}** days

@ -157,7 +157,7 @@ exports.Servant = class {
return this.processCommand(msg, globResult, content); return this.processCommand(msg, globResult, content);
} else if (commands.length < (config.maxCmdSequenceLength || 5)) { } else if (commands.length < (config.maxCmdSequenceLength || 5)) {
let answers = []; let answers = [];
let previousCommand = (commands[0].match(/^.\w+/) || [])[0];; let previousCommand = (commands[0].match(/^.\w+/) || [])[0];
for (let i = 0; i < commands.length; i++) { for (let i = 0; i < commands.length; i++) {
answers.push(this.processCommand(msg, globResult[i], commands[i], answers.push(this.processCommand(msg, globResult[i], commands[i],
true, previousCommand)); // return function to avoid "race conditions" true, previousCommand)); // return function to avoid "race conditions"

Loading…
Cancel
Save