mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-20 05:51:35 +02:00
Remove moment and moment-duration-format
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user