Format numbers, style changes, fixes

This commit is contained in:
Daniel Odendahl Jr
2018-10-13 02:28:07 +00:00
parent 5c2c9d25a5
commit b0780575be
45 changed files with 146 additions and 159 deletions
+3 -2
View File
@@ -1,5 +1,5 @@
const Command = require('../../structures/Command');
const { list, firstUpperCase } = require('../../util/Util');
const { list, firstUpperCase, formatNumber } = require('../../util/Util');
const planets = require('../../assets/json/gravity');
module.exports = class GravityCommand extends Command {
@@ -28,6 +28,7 @@ module.exports = class GravityCommand extends Command {
}
run(msg, { weight, planet }) {
return msg.say(`${weight} kg on ${firstUpperCase(planet)} is ${weight * planets[planet]} kg.`);
const result = weight * planets[planet];
return msg.say(`${formatNumber(weight)} kg on ${firstUpperCase(planet)} is ${formatNumber(result)} kg.`);
}
};