Remove moment and moment-duration-format

This commit is contained in:
Daniel Odendahl Jr
2017-08-30 22:14:24 +00:00
parent 158716a453
commit 7d1adaec39
14 changed files with 36 additions and 36 deletions
+2 -3
View File
@@ -1,8 +1,7 @@
const Command = require('../../structures/Command');
const { MessageEmbed } = require('discord.js');
const { version } = require('../../package');
const moment = require('moment');
require('moment-duration-format');
const { duration } = require('../../structures/Util');
module.exports = class InfoCommand extends Command {
constructor(client) {
@@ -34,7 +33,7 @@ module.exports = class InfoCommand extends Command {
.addField(' Memory Usage',
`${Math.round(memory.reduce((prev, val) => prev + val, 0) / 1024 / 1024)}MB`, true)
.addField(' Uptime',
moment.duration(this.client.uptime).format('d[d]h[h]m[m]s[s]'), true)
duration(this.client.uptime).format, true)
.addField(' Version',
`v${version}`, true)
.addField(' Node Version',
+2 -3
View File
@@ -1,7 +1,6 @@
const Command = require('../../structures/Command');
const { MessageEmbed } = require('discord.js');
const moment = require('moment');
require('moment-duration-format');
const { duration } = require('../../structures/Util');
module.exports = class ShardInfoCommand extends Command {
constructor(client) {
@@ -40,7 +39,7 @@ module.exports = class ShardInfoCommand extends Command {
.addField(' Memory Usage',
`${Math.round(memory[shard] / 1024 / 1024)}MB`, true)
.addField(' Uptime',
moment.duration(uptime[shard]).format('d[d]h[h]m[m]s[s]'), true);
duration(uptime[shard]).format, true);
return msg.embed(embed);
}
};
+2 -3
View File
@@ -1,6 +1,5 @@
const Command = require('../../structures/Command');
const moment = require('moment');
require('moment-duration-format');
const { duration } = require('../../structures/Util');
module.exports = class UptimeCommand extends Command {
constructor(client) {
@@ -14,6 +13,6 @@ module.exports = class UptimeCommand extends Command {
}
run(msg) {
return msg.say(moment.duration(this.client.uptime).format('d[ days], h[ hours], m[ minutes, and ]s[ seconds]'));
return msg.say(duration(this.client.uptime).format);
}
};