Files
xiao/commands/util/uptime.js
T
Daniel Odendahl Jr c5f29c59c5 Guard All Util Commands
2017-05-28 14:04:48 +00:00

20 lines
637 B
JavaScript

const { Command } = require('discord.js-commando');
const moment = require('moment');
require('moment-duration-format');
module.exports = class UptimeCommand extends Command {
constructor(client) {
super(client, {
name: 'uptime',
group: 'util',
memberName: 'uptime',
description: 'Displays how long the bot has been active on this shard.',
guarded: true
});
}
run(msg) {
return msg.say(`I've been active on this shard for: **${moment.duration(this.client.uptime).format('d[ days], h[ hours], m[ minutes, and ]s[ seconds]')}**!`);
}
};