Skip to content

Commit de27172

Browse files
committed
Update bot.ts
1 parent 29b6727 commit de27172

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/commands/info/bot.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,17 @@ const command: Command = {
1616
ephemeral: true,
1717
async execute(interaction: ChatInputCommandInteraction, client: ExtendedClient, Discord: typeof import("discord.js")) {
1818
try {
19+
const guildCount = (await client.shard.fetchClientValues("guilds.cache.size")).reduce((acc: number, gc: number) => acc + gc, 0);
20+
1921
const info = new Discord.EmbedBuilder()
2022
.setColor(client.config.embeds.default as ColorResolvable)
2123
.setAuthor({ name: client.user?.tag, iconURL: client.user?.displayAvatarURL({ extension: "png", forceStatic: false }), url: `https://discord.com/users/${client.user?.id}` })
2224
.setDescription(bot.description)
2325
.addFields (
2426
{ name: "📈 Version", value: bot.version, inline: true },
2527
{ name: "🟢 Online Since", value: `<t:${(Date.now() - client?.uptime).toString().slice(0, -3)}:f>`, inline: true },
26-
{ name: "📊 Guild Count", value: `${client.guilds.cache.size}`, inline: true }
28+
{ name: "🤖 Shard ID", value: `${client.shard.ids[0]}` },
29+
{ name: "📊 Guild Count", value: `**${guildCount}** (on this shard: ${client.guilds.cache.size})`, inline: true }
2730
)
2831

2932
const buttons: any = new Discord.ActionRowBuilder()

0 commit comments

Comments
 (0)