From 12e8c3dca143cb031311d1983765d5f668d02b22 Mon Sep 17 00:00:00 2001 From: JonnyBro Date: Wed, 5 Jan 2022 12:28:29 +0500 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BA=D1=80=D1=8B=D1=82=D1=8C=20=D1=83?= =?UTF-8?q?=D1=87=D0=B0=D1=81=D1=82=D0=BD=D0=B8=D0=BA=D0=BE=D0=B2=20=D1=81?= =?UTF-8?q?=D0=B5=D1=80=D0=B2=D0=B5=D1=80=D0=B0=20=D1=81=20=D1=8D=D0=BC?= =?UTF-8?q?=D0=BE=D0=B4=D0=B6=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commands/General/stats.js | 9 +++++++-- events/ready.js | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) 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}`, {