20
21 async execute(error, client) {
22 console.log("=======================================< LIMIT >=======================================".gray);
23 console.log(`${color.bold.bgBlue(`[${moment().format("dddd - DD/MM/YYYY - hh:mm:ss", true)}]`)} ` + `${color.bold.red(`[WARNING]`)} ` + `${error}`.bgRed);24 }
25};
26
22 console.log("=======================================< LIMIT >=======================================".gray);
23 console.log(`${color.bold.bgBlue(`[${moment().format("dddd - DD/MM/YYYY - hh:mm:ss", true)}]`)} ` + `${color.bold.green(`[SHARD ID RESUME]`)} ` + `[${id}]`.cyan);
24 console.log("=======================================< LIMIT >=======================================".gray);
25 console.log(`${color.bold.bgBlue(`[${moment().format("dddd - DD/MM/YYYY - hh:mm:ss", true)}]`)} ` + `${color.bold.green(`[SHARD EVENT RESUME]`)} ` + `[${replayedEvents}]`.cyan);26 }
27};
28
20
21 async execute(id, replayedEvents, client) {
22 console.log("=======================================< LIMIT >=======================================".gray);
23 console.log(`${color.bold.bgBlue(`[${moment().format("dddd - DD/MM/YYYY - hh:mm:ss", true)}]`)} ` + `${color.bold.green(`[SHARD ID RESUME]`)} ` + `[${id}]`.cyan);24 console.log("=======================================< LIMIT >=======================================".gray);
25 console.log(`${color.bold.bgBlue(`[${moment().format("dddd - DD/MM/YYYY - hh:mm:ss", true)}]`)} ` + `${color.bold.green(`[SHARD EVENT RESUME]`)} ` + `[${replayedEvents}]`.cyan);
26 }
20
21 async execute(id, client) {
22 console.log("=======================================< LIMIT >=======================================".gray);
23 console.log(`${color.bold.bgBlue(`[${moment().format("dddd - DD/MM/YYYY - hh:mm:ss", true)}]`)} ` + `${color.bold.green(`[SHARD RECONNECTING]`)} ` + `[${id}]`.cyan);24 }
25};
26
20
21 async execute(id, client) {
22 console.log("=======================================< LIMIT >=======================================".gray);
23 console.log(`${color.bold.bgBlue(`[${moment().format("dddd - DD/MM/YYYY - hh:mm:ss", true)}]`)} ` + `${color.bold.green(`[SHARD READY]`)} ` + `[${id}]`.cyan);24 }
25};
26
It's unnecessary to concatenate two string literals together, such as:
let foo = "a" + "b";
This code is likely the result of refactoring where a variable was removed from the concatenation (such as "a" + b + "b"). In such a case, the concatenation isn't important and the code can be rewritten as:
let foo = "ab";
let a = `some` + `string`;
// these are the same as "10"
a = '1' + '0';
a = '1' + `0`;
a = `1` + '0';
a = `1` + `0`;
// when a non string is included
let c = a + b;
c = '1' + a;
let a = 1 + '1';
c = 1 - 2;
// when the string concatenation is multiline
c = "foo" + "bar";