Add total members to botinfo command
All checks were successful
CI / CI (push) Successful in 1m22s

This commit is contained in:
SileNce5k 2025-05-08 17:37:05 +02:00
parent 7053495f40
commit 28d1f6d0a2
Signed by: SileNce
GPG key ID: B0A142BB4291B204
5 changed files with 30 additions and 17 deletions

View file

@ -1,8 +0,0 @@
module.exports = function(client){
let guildCount = 0;
client.guilds.cache.each(() => {
guildCount++
});
return guildCount;
}

9
util/getGuildInfo.js Normal file
View file

@ -0,0 +1,9 @@
module.exports = function(client){
let guildCount = 0;
let totalMembers = 0;
client.guilds.cache.each(guild => {
guildCount++
totalMembers += guild.memberCount;
});
return {guildCount: guildCount, totalMembers: totalMembers};
}

View file

@ -1,9 +1,9 @@
const getGuildCount = require("./getGuildCount")
const getGuildInfo = require("./getGuildInfo")
const parseMS = require('./parseMS');
const convertDateToISOString = require('./convertDateToISOString')
module.exports = function ({presenceText, presenceType, client}) {
const {globalPrefix} = require ('../data/config.json')
let guildCount = getGuildCount(client)
let guildCount = getGuildInfo(client).guildCount
let uptime = parseMS(client.uptime);
let uptimeFormat = "";
let uptimeSingularOrPlural;