mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-22 05:04:58 +05:00
remove hidden channel from counter
This commit is contained in:
parent
c22dd92a35
commit
8b005b4d06
1 changed files with 9 additions and 13 deletions
|
@ -15,13 +15,11 @@ class Ready extends BaseEvent {
|
||||||
async execute(client) {
|
async execute(client) {
|
||||||
const commands = [...new Map(client.commands.map(v => [v.constructor.name, v])).values()];
|
const commands = [...new Map(client.commands.map(v => [v.constructor.name, v])).values()];
|
||||||
|
|
||||||
let hiddenGuildMembersCount = client.guilds.cache.get("568120814776614924").memberCount;
|
let servers = client.guilds.cache.size;
|
||||||
let tServers = client.guilds.cache.size - 1;
|
let users = 0;
|
||||||
let tUsers = 0;
|
|
||||||
client.guilds.cache.forEach(g => {
|
client.guilds.cache.forEach(g => {
|
||||||
tUsers += g.memberCount;
|
users += g.memberCount;
|
||||||
});
|
});
|
||||||
tUsers = tUsers - hiddenGuildMembersCount;
|
|
||||||
|
|
||||||
const birthdays = require("../helpers/birthdays");
|
const birthdays = require("../helpers/birthdays");
|
||||||
birthdays.init(client);
|
birthdays.init(client);
|
||||||
|
@ -32,7 +30,7 @@ class Ready extends BaseEvent {
|
||||||
if (client.config.dashboard.enabled) await client.dashboard.load(client);
|
if (client.config.dashboard.enabled) await client.dashboard.load(client);
|
||||||
|
|
||||||
client.logger.ready(`Loaded a total of ${commands.length} command(s).`);
|
client.logger.ready(`Loaded a total of ${commands.length} command(s).`);
|
||||||
client.logger.ready(`${client.user.getUsername()}, ready to serve ${tUsers} members in ${tServers} servers.`);
|
client.logger.ready(`${client.user.getUsername()}, ready to serve ${users} members in ${servers} servers.`);
|
||||||
|
|
||||||
console.timeEnd("botReady");
|
console.timeEnd("botReady");
|
||||||
|
|
||||||
|
@ -40,19 +38,17 @@ class Ready extends BaseEvent {
|
||||||
const status = [
|
const status = [
|
||||||
{ name: "/help", type: ActivityType.Watching },
|
{ name: "/help", type: ActivityType.Watching },
|
||||||
{ name: `${commands.length} ${client.functions.getNoun(commands.length, client.translate("misc:NOUNS:COMMANDS:1"), client.translate("misc:NOUNS:COMMANDS:2"), client.translate("misc:NOUNS:COMMANDS:5"))}`, type: ActivityType.Listening },
|
{ name: `${commands.length} ${client.functions.getNoun(commands.length, client.translate("misc:NOUNS:COMMANDS:1"), client.translate("misc:NOUNS:COMMANDS:2"), client.translate("misc:NOUNS:COMMANDS:5"))}`, type: ActivityType.Listening },
|
||||||
{ name: `${tServers} ${client.functions.getNoun(tServers, client.translate("misc:NOUNS:SERVER:1"), client.translate("misc:NOUNS:SERVER:2"), client.translate("misc:NOUNS:SERVER:5"))}`, type: ActivityType.Watching },
|
{ name: `${servers} ${client.functions.getNoun(servers, client.translate("misc:NOUNS:SERVER:1"), client.translate("misc:NOUNS:SERVER:2"), client.translate("misc:NOUNS:SERVER:5"))}`, type: ActivityType.Watching },
|
||||||
{ name: `${tUsers} ${client.functions.getNoun(tUsers, client.translate("misc:NOUNS:USERS:1"), client.translate("misc:NOUNS:USERS:2"), client.translate("misc:NOUNS:USERS:5"))}`, type: ActivityType.Watching },
|
{ name: `${users} ${client.functions.getNoun(users, client.translate("misc:NOUNS:USERS:1"), client.translate("misc:NOUNS:USERS:2"), client.translate("misc:NOUNS:USERS:5"))}`, type: ActivityType.Watching },
|
||||||
];
|
];
|
||||||
|
|
||||||
let i = 0;
|
let i = 0;
|
||||||
setInterval(async function () {
|
setInterval(async function () {
|
||||||
hiddenGuildMembersCount = client.guilds.cache.get("568120814776614924").memberCount;
|
servers = client.guilds.cache.size;
|
||||||
tServers = client.guilds.cache.size - 1;
|
users = 0;
|
||||||
tUsers = 0;
|
|
||||||
client.guilds.cache.forEach(g => {
|
client.guilds.cache.forEach(g => {
|
||||||
tUsers += g.memberCount;
|
users += g.memberCount;
|
||||||
});
|
});
|
||||||
tUsers = tUsers - hiddenGuildMembersCount;
|
|
||||||
|
|
||||||
client.user.setActivity(`${status[i].name} | v${version}`, {
|
client.user.setActivity(`${status[i].name} | v${version}`, {
|
||||||
type: status[i].type,
|
type: status[i].type,
|
||||||
|
|
Loading…
Reference in a new issue