diff --git a/commands/analyze/parse-time.js b/commands/analyze/parse-time.js index 5cc70c96..05470ab4 100644 --- a/commands/analyze/parse-time.js +++ b/commands/analyze/parse-time.js @@ -1,5 +1,6 @@ const Command = require('../../structures/Command'); const moment = require('moment'); +require('moment-duration-format'); module.exports = class ParseTimeCommand extends Command { constructor(client) { @@ -20,8 +21,8 @@ module.exports = class ParseTimeCommand extends Command { } run(msg, { time }) { - const timeMs = time.startDate.getTime() - Date.now(); - const display = moment().add(timeMs, 'ms').fromNow(); + const time = moment.duration(Date.now() - time.startDate.getTime()); + const display = time.format('Y [years,] M [months,] d [days,] h [hours,] m [minutes and] s [seconds]'); return msg.say(`This time duration parses as **${display}**.`); } }; diff --git a/package.json b/package.json index 47f0157b..f272f2b9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "121.2.0", + "version": "121.2.1", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {