diff --git a/commands/uptime.js b/commands/uptime.js index cbbb8fc..025727d 100644 --- a/commands/uptime.js +++ b/commands/uptime.js @@ -7,11 +7,13 @@ module.exports = { usage: '', trusted: 0, execute (bot, username, sender, prefix, args, config, hash, ownerhash, selector) { - const time = moment.utc(Math.floor(performance.now())).format('D [days], H [hours], m [minutes], s [seconds]') + const duration = moment.duration(Math.floor(performance.now())) + const time = `${duration.days()} days, ${duration.hours()} hours, ${duration.minutes()}, minutes, ${duration.seconds()} seconds` // moment please add duration.format() bot.tellraw(selector, [{ text: 'The bot\'s uptime is ', color: 'white' }, { text: time, color: 'green' }]) }, discordExecute (bot, username, sender, prefix, args, channeldc, message, config) { - const time = moment.utc(Math.floor(performance.now())).format('D [days], H [hours], m [minutes], s [seconds]') + const duration = moment.duration(Math.floor(performance.now())) + const time = `${duration.days()} days, ${duration.hours()} hours, ${duration.minutes()}, minutes, ${duration.seconds()} seconds` // moment please add duration.format() const Embed = new EmbedBuilder() .setColor(config.discord.embedsColors.normal) .setTitle('Bot\'s Uptime')