diff --git a/commands/General/stats.js b/commands/General/stats.js index 556d1b29..9e2b9824 100644 --- a/commands/General/stats.js +++ b/commands/General/stats.js @@ -18,6 +18,11 @@ class Stats extends Command { } async run(message, args, data) { + const hidenGuild = await this.client.guilds.fetch("568120814776614924").members.cache.size; + users = this.client.users.cache.size - hidenGuild, + servers = this.client.guilds.cache.size - 1; + + const statsEmbed = new Discord.MessageEmbed() .setColor(data.config.embed.color) .setFooter({ @@ -28,8 +33,8 @@ class Stats extends Command { }) .setDescription(message.translate("general/stats:MADE")) .addField(this.client.customEmojis.stats + " " + message.translate("general/stats:COUNTS_TITLE"), message.translate("general/stats:COUNTS_CONTENT", { - servers: this.client.guilds.cache.size, - users: this.client.users.cache.size + servers: servers, + users: users }), 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) diff --git a/events/ready.js b/events/ready.js index f48e50ed..4f981f81 100644 --- a/events/ready.js +++ b/events/ready.js @@ -38,7 +38,7 @@ module.exports = class { if (client.config.dashboard.enabled) client.dashboard.load(client); // Update status every 20s - let servers = client.guilds.cache.filter(guild => guild.id != "568120814776614924" && guild.id != "892727526911258654").size; + let servers = client.guilds.cache.filter(guild => guild.id !== "568120814776614924" && guild.id !== "892727526911258654").size; const version = require("../package.json").version; const status = [ { name: `${servers} ${client.getNoun(servers, client.translate("misc:NOUNS:SERVER:1"), client.translate("misc:NOUNS:SERVER:2"), client.translate("misc:NOUNS:SERVER:5"))}`, type: "LISTENING" }, @@ -48,7 +48,7 @@ module.exports = class { let i = 0; setInterval(function () { - servers = client.guilds.cache.filter(guild => guild.id != "568120814776614924" && guild.id != "892727526911258654").size; + servers = client.guilds.cache.filter(guild => guild.id !== "568120814776614924" && guild.id !== "892727526911258654").size; const toShow = status[parseInt(i, 10)]; client.user.setActivity(`${toShow.name} | v${version}`, {