mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-03 06:28:53 +00:00
Fix: Add total member count in /guilds system command
This commit is contained in:
1 parent
bea3894c03
commit
d8951284cb
1 file changed
+7
-3
@@ -34,9 +34,13 @@ module.exports = {
|
||||
.map((guild, index) => `${index + 1}. \`${guild.name} (#${guild.memberCount})\``)
|
||||
.join('\n');
|
||||
|
||||
let embedDescription = `**${embedIcons.bot} ${
|
||||
client.guilds.cache.size < 50 ? `Top ${client.guilds.cache.size} guilds` : 'Top 50 guilds'
|
||||
} by member count (${client.guilds.cache.size} total)**\n${guildsList}`;
|
||||
const totalMemberCount = client.guilds.cache.reduce((a, b) => a + b.memberCount, 0);
|
||||
|
||||
let embedDescription =
|
||||
`**${embedIcons.bot} ${
|
||||
client.guilds.cache.size < 50 ? `Top ${client.guilds.cache.size} guilds` : 'Top 50 guilds'
|
||||
} by member count (${client.guilds.cache.size} total)**\n${guildsList}` +
|
||||
`\n\n**Total members:** \`${totalMemberCount}\``;
|
||||
|
||||
if (embedDescription.length >= 4000) {
|
||||
embedDescription = `${embedDescription.slice(0, 3996)}...`;
|
||||
|
||||
Reference in new issue
Block a user