2022-01-13 00:56:24 +05:00
|
|
|
const Command = require("../../base/Command"),
|
2022-01-04 02:18:28 +05:00
|
|
|
Discord = require("discord.js");
|
|
|
|
|
|
|
|
class Stats extends Command {
|
|
|
|
constructor(client) {
|
|
|
|
super(client, {
|
|
|
|
name: "stats",
|
|
|
|
dirname: __dirname,
|
|
|
|
enabled: true,
|
|
|
|
guildOnly: false,
|
2022-01-05 22:04:46 +05:00
|
|
|
aliases: ["stat"],
|
2022-01-04 02:18:28 +05:00
|
|
|
memberPermissions: [],
|
|
|
|
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS"],
|
|
|
|
nsfw: false,
|
|
|
|
ownerOnly: false,
|
|
|
|
cooldown: 1000
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
async run(message, args, data) {
|
2022-01-05 12:36:28 +05:00
|
|
|
const hiddenGuild = await this.client.guilds.fetch("568120814776614924");
|
|
|
|
const users = this.client.users.cache.size - hiddenGuild.memberCount;
|
|
|
|
const servers = this.client.guilds.cache.size - 1;
|
2022-01-05 12:28:29 +05:00
|
|
|
|
2022-01-04 02:18:28 +05:00
|
|
|
const statsEmbed = new Discord.MessageEmbed()
|
|
|
|
.setColor(data.config.embed.color)
|
2022-01-05 00:24:57 +05:00
|
|
|
.setFooter({
|
|
|
|
text: data.config.embed.footer
|
|
|
|
})
|
|
|
|
.setAuthor({
|
|
|
|
name: message.translate("common:STATS")
|
|
|
|
})
|
2022-01-04 02:18:28 +05:00
|
|
|
.setDescription(message.translate("general/stats:MADE"))
|
|
|
|
.addField(this.client.customEmojis.stats + " " + message.translate("general/stats:COUNTS_TITLE"), message.translate("general/stats:COUNTS_CONTENT", {
|
2022-01-05 12:28:29 +05:00
|
|
|
servers: servers,
|
|
|
|
users: users
|
2022-01-04 02:18:28 +05:00
|
|
|
}), true)
|
|
|
|
.addField(this.client.customEmojis.version + " " + message.translate("general/stats:VERSIONS_TITLE"), `\`Discord.js : v${Discord.version}\`\n\`Nodejs : v${process.versions.node}\``, true)
|
|
|
|
.addField(this.client.customEmojis.ram + " " + message.translate("general/stats:RAM_TITLE"), `\`${(process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2)}MB\``, true)
|
|
|
|
.addField(this.client.customEmojis.status.online + " " + message.translate("general/stats:ONLINE_TITLE"), message.translate("general/stats:ONLINE_CONTENT", {
|
|
|
|
time: message.convertTime(Date.now() + this.client.uptime, "from", true)
|
|
|
|
}))
|
|
|
|
.addField(this.client.customEmojis.voice + " " + message.translate("general/stats:MUSIC_TITLE"), message.translate("general/stats:MUSIC_CONTENT", {
|
|
|
|
count: `${this.client.player.voices.collection.size} ${message.getNoun(this.client.player.voices.collection.size, message.translate("misc:NOUNS:SERVERS:1"), message.translate("misc:NOUNS:SERVERS:2"), message.translate("misc:NOUNS:SERVERS:5"))}`
|
|
|
|
}))
|
|
|
|
.addField(message.translate("general/stats:CREDITS_TITLE"), message.translate("general/stats:CREDITS_CONTENT", {
|
2022-01-05 22:04:46 +05:00
|
|
|
donators: ["**`Добрый Спецназ#8801`** - Тестер, генератор идей"].join("\n"),
|
2022-01-05 00:47:59 +05:00
|
|
|
translators: ["**`Jonny_Bro#4226`** (:flag_ru:)"].join("\n")
|
2022-01-13 18:55:13 +05:00
|
|
|
}))
|
|
|
|
.addField(this.client.customEmojis.link + " " + message.translate("general/stats:LINKS_TITLE"), message.translate("misc:STATS_FOOTER", {
|
|
|
|
dashboardLink: "https://jaba.pp.ua/",
|
|
|
|
docsLink: "https://jaba.pp.ua/docs/",
|
|
|
|
donateLink: "https://qiwi.com/n/JONNYBRO/",
|
|
|
|
owner: this.client.config.owner.id
|
2022-01-04 02:18:28 +05:00
|
|
|
}));
|
2022-01-05 00:24:57 +05:00
|
|
|
message.channel.send({
|
|
|
|
embeds: [statsEmbed]
|
|
|
|
});
|
2022-01-04 02:18:28 +05:00
|
|
|
}
|
2022-01-13 00:26:23 +05:00
|
|
|
}
|
2022-01-04 02:18:28 +05:00
|
|
|
|
|
|
|
module.exports = Stats;
|