More versions in info

This commit is contained in:
Dragon Fire
2020-03-01 13:46:50 -05:00
parent 3ff97ca9bf
commit ed69080885
2 changed files with 12 additions and 7 deletions
+11 -6
View File
@@ -1,5 +1,6 @@
const Command = require('../../structures/Command');
const { MessageEmbed, version: djsVersion } = require('discord.js');
const { MessageEmbed, version: djsVersion, Permissions } = require('discord.js');
const { version: commandoVersion } = require('discord.js-commando');
const moment = require('moment');
require('moment-duration-format');
const { formatNumber } = require('../../util/Util');
@@ -20,20 +21,24 @@ module.exports = class InfoCommand extends Command {
});
}
run(msg) {
async run(msg) {
const invite = await this.client.generateInvite(Permissions.ALL);
const embed = new MessageEmbed()
.setColor(0x00AE86)
.setFooter('©2017-2020 dragonfire535#8081')
.addField(' Servers', formatNumber(this.client.guilds.cache.size), true)
.addField(' Commands', formatNumber(this.client.registry.commands.size), true)
.addField(' Uptime', moment.duration(this.client.uptime).format('d:hh:mm:ss'), true)
.addField(' Shards', formatNumber(this.client.options.shardCount), true)
.addField(' Home Server', this.client.options.invite ? `[Invite](${this.client.options.invite})` : 'None', true)
.addField(' Invite', `[Add Me](${invite})`, true)
.addField(' Source Code',
source ? `[Github](https://github.com/${XIAO_GITHUB_REPO_USERNAME}/${XIAO_GITHUB_REPO_NAME})` : 'N/A', true)
source ? `[GitHub](https://github.com/${XIAO_GITHUB_REPO_USERNAME}/${XIAO_GITHUB_REPO_NAME})` : 'N/A', true)
.addField(' Memory Usage', `${Math.round(process.memoryUsage().heapUsed / 1024 / 1024)}MB`, true)
.addField(' Uptime', moment.duration(this.client.uptime).format('d:hh:mm:ss'), true)
.addField(' Version', `v${version}`, true)
.addField(' Node Version', process.version, true)
.addField(' D.js Version', `v${djsVersion}`, true)
.addField(' Node.js', process.version, true)
.addField(' Discord.js', `v${djsVersion}`, true)
.addField(' Commando', `v${commandoVersion}`, true)
.addField(' Dependencies', this.parseDependencies(dependencies));
return msg.embed(embed);
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "111.0.2",
"version": "111.0.3",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {