Skip to content

Commit

Permalink
fix: fix stats member count
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-737 committed May 28, 2024
1 parent e9a12e2 commit 3245f24
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/commands/slash/Information/stats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ export default class Stats extends BaseCommand {
const totalHubs = await hubs?.count();
const totalNetworkMessages = await originalMessages.count();

const count: number[] = await interaction.client.cluster.fetchClientValues('guilds.cache.size');
const guildCount = count.reduce((p, n) => p + n, 0);
const memberCount = await interaction.client.cluster.fetchClientValues(
const guildCount: number[] =
await interaction.client.cluster.fetchClientValues('guilds.cache.size');
const memberCount: number[] = await interaction.client.cluster.fetchClientValues(
'guilds.cache.reduce((p, n) => p + n.memberCount, 0)',
);

Expand All @@ -59,17 +59,15 @@ export default class Stats extends BaseCommand {
value: stripIndents`
Up Since: ${time(upSince, 'R')}
Servers: ${guildCount}
Members: ${memberCount}
`,
Members: ${memberCount.reduce((p, n) => p + n, 0)}`,
inline: true,
},
{
name: 'System Stats',
value: stripIndents`
OS: Linux
CPU Cores: ${cpus().length}
RAM Usage: ${memoryUsed} MB / ${totalMemory} GB
`,
RAM Usage: ${memoryUsed} MB / ${totalMemory} GB`,
inline: true,
},
{
Expand Down

0 comments on commit 3245f24

Please sign in to comment.