Files
xiao/commands/util/info.js
T
Daniel Odendahl Jr 6e96c5e914 62.0.0
2018-01-26 14:35:47 +00:00

44 lines
1.3 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
const { Command } = require('discord.js-commando');
const { MessageEmbed } = require('discord.js');
const { version } = require('../../package');
const { duration } = require('../../util/Util');
module.exports = class InfoCommand extends Command {
constructor(client) {
super(client, {
name: 'info',
aliases: ['information', 'stats'],
group: 'util',
memberName: 'info',
description: 'Responds with detailed bot information.',
guarded: true,
clientPermissions: ['EMBED_LINKS']
});
}
run(msg) {
const embed = new MessageEmbed()
.setColor(0x00AE86)
.setFooter('©2017 dragonfire535#0817')
.addField(' Servers',
this.client.guilds.size, true)
.addField(' Shards',
this.client.options.shardCount, true)
.addField(' Commands',
this.client.registry.commands.size, true)
.addField(' Home Server',
`[Here](${this.client.options.invite})`, true)
.addField(' Memory Usage',
`${Math.round(process.memoryUsage().heapUsed / 1024 / 1024)}MB`, true)
.addField(' Uptime',
duration(this.client.uptime).format(), true)
.addField(' Version',
`v${version}`, true)
.addField(' Node Version',
process.version, true)
.addField(' Library',
'[discord.js](https://discord.js.org)[-commando](https://github.com/Gawdl3y/discord.js-commando)', true);
return msg.embed(embed);
}
};