mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-22 05:04:58 +05:00
Скрыть участников сервера с эмоджи
This commit is contained in:
parent
5ce51b8058
commit
12e8c3dca1
2 changed files with 9 additions and 4 deletions
|
@ -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)
|
||||
|
|
|
@ -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}`, {
|
||||
|
|
Loading…
Reference in a new issue