woomy/src/commands/about.js

59 lines
2.1 KiB
JavaScript
Raw Normal View History

2020-01-25 10:02:43 +00:00
const { version } = require("discord.js");
const moment = require("moment");
require("moment-duration-format");
exports.run = (client, message) => {
const duration = moment
.duration(client.uptime)
.format(" D [days], H [hrs], m [mins], s [secs]");
2020-03-09 01:11:33 +00:00
var mud = client.users.cache.get(client.config.owners[0]).tag;
var flgx = client.users.cache.get(client.config.owners[1]).tag;
2020-01-25 10:02:43 +00:00
var build;
var prefix;
if(message.guild) {
prefix = message.settings.prefix;
} else {
prefix = client.config.defaultSettings.prefix;
};
if(client.devmode == true) {
build = "development"
} else {
build = "production"
}
2020-03-09 01:11:33 +00:00
embed = new Discord.MessageEmbed();
2020-01-25 10:02:43 +00:00
embed.setColor(client.embedColour(message));
embed.setThumbnail(client.user.avatarURL({format: "png", dynamic: true, size: 2048}))
2020-03-26 04:31:32 +00:00
embed.setTitle("About Woomy")
2020-01-25 10:02:43 +00:00
embed.addField(
2020-03-09 01:11:33 +00:00
"General:", `• users: \`${client.users.cache.size}\`\n• channels: \`${client.channels.cache.size}\`\n• servers: \`${client.guilds.cache.size}\`\n• commands: \`${client.commands.size}\`\n• uptime: \`${duration}\``,true
2020-01-25 10:02:43 +00:00
);
embed.addField(
2020-03-09 01:11:33 +00:00
`Technical:`, `• RAM Usage: \`${(process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2)} MB\`\n• OS: \`${require("os").type}\`\n• bot version: \`${client.version.number} (${build})\`\n• discord.js version: \`v${version}\`\n• node.js version: \`${process.version}\``,true
2020-01-25 10:02:43 +00:00
);
embed.addField(
2020-03-09 01:11:33 +00:00
"Links:", "[Support](https://discord.gg/HCF8mdv) | [GitHub](https://github.com/mudkipscience/woomy) | [db.org](https://discordbots.org/bot/435961704145485835/vote) | [BFD](https://botsfordiscord.com/bots/435961704145485835/vote) | [top.gg](https://discordbotlist.com/bots/435961704145485835) | [discord.js](https://discord.js.org/#/) | [guidebot](https://github.com/AnIdiotsGuide/guidebot/)"
2020-01-25 10:02:43 +00:00
);
message.channel.send(embed);
};
exports.conf = {
enabled: true,
guildOnly: false,
2020-03-16 05:30:43 +00:00
aliases: ["stats", "botinfo"],
2020-01-25 10:02:43 +00:00
permLevel: "User",
requiredPerms: []
};
exports.help = {
name: "about",
category: "Utility",
description: "Information about the bot, as well as a couple of helpful links",
usage: "about"
};