From 5ce5ef68982cd5d67cc452d271ac8b2b47c7ab9b Mon Sep 17 00:00:00 2001 From: Liam Date: Sun, 30 Jun 2024 07:34:49 +0100 Subject: [PATCH] format numbers on botstats command --- .../bat/command/impl/general/BotStatsCommand.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/cc/fascinated/bat/command/impl/general/BotStatsCommand.java b/src/main/java/cc/fascinated/bat/command/impl/general/BotStatsCommand.java index ef5652b..000ad5e 100644 --- a/src/main/java/cc/fascinated/bat/command/impl/general/BotStatsCommand.java +++ b/src/main/java/cc/fascinated/bat/command/impl/general/BotStatsCommand.java @@ -3,6 +3,7 @@ package cc.fascinated.bat.command.impl.general; import cc.fascinated.bat.command.BatCommand; import cc.fascinated.bat.command.CommandInfo; import cc.fascinated.bat.common.EmbedUtils; +import cc.fascinated.bat.common.NumberFormatter; import cc.fascinated.bat.common.TimeUtils; import cc.fascinated.bat.model.BatGuild; import cc.fascinated.bat.model.BatUser; @@ -42,14 +43,14 @@ public class BotStatsCommand extends BatCommand { interaction.replyEmbeds(EmbedUtils.genericEmbed().setDescription( "**Bot Statistics**\n" + - "➜ Guilds: **%s**\n".formatted(jda.getGuilds().size()) + - "➜ Users: **%s**\n".formatted(jda.getUsers().size()) + + "➜ Guilds: **%s**\n".formatted(NumberFormatter.format(jda.getGuilds().size())) + + "➜ Users: **%s**\n".formatted(NumberFormatter.format(jda.getUsers().size())) + "➜ Gateway Ping: **%sms**\n".formatted(jda.getGatewayPing()) + "\n" + "**Bat Statistics**\n" + "➜ Uptime: **%s**\n".formatted(TimeUtils.format(bean.getUptime())) + - "➜ Cached Guilds: **%s**\n".formatted(guildService.getGuilds().size()) + - "➜ Cached Users: **%s**".formatted(userService.getUsers().size()) + "➜ Cached Guilds: **%s**\n".formatted(NumberFormatter.format(guildService.getGuilds().size())) + + "➜ Cached Users: **%s**".formatted(NumberFormatter.format(userService.getUsers().size())) ).build()).queue(); } }