Previously wrong station number in statistics

This commit is contained in:
Christer Warén 2020-04-03 23:54:05 +03:00
parent 9648e828e6
commit 2fef361d45

View File

@ -17,14 +17,15 @@ module.exports = {
Object.keys(client.stations).forEach(function(station) {
if(currentGuild.statistics[stations[station].name]){
if(i > 0){
statistics += "**" + station + " " + stations[station].name + "** \n";
statistics += `**${parseInt(station) + 1}** ` + stations[station].name + " \n";
statistics += "Time: " + client.funcs.msToTime(currentGuild.statistics[stations[station].name].time, "hh:mm:ss") + "\n";
statistics += "Used: " + currentGuild.statistics[stations[station].name].used + "\n";
} else {
statistics = "**" + station + " " + stations[station].name + "** \n";
statistics = `**${parseInt(station) + 1}** ` + stations[station].name + " \n";
statistics += "Time: " + client.funcs.msToTime(currentGuild.statistics[stations[station].name].time, "hh:mm:ss") + "\n";
statistics += "Used: " + currentGuild.statistics[stations[station].name].used + "\n";
}
i++;
}
});