don't use embed fields for botstats
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 36s

This commit is contained in:
Lee 2024-06-27 11:45:06 +01:00
parent 99570d6f86
commit d5ee54d011

@ -24,11 +24,12 @@ public class BotStatsCommand extends BatCommand {
@Override @Override
public void execute(BatGuild guild, @NonNull BatUser user, @NonNull MessageChannel channel, Member member, @NonNull SlashCommandInteraction interaction) { public void execute(BatGuild guild, @NonNull BatUser user, @NonNull MessageChannel channel, Member member, @NonNull SlashCommandInteraction interaction) {
JDA jda = DiscordService.JDA; JDA jda = DiscordService.JDA;
interaction.replyEmbeds(EmbedUtils.genericEmbed()
.setDescription("An overview of the bot statistics") interaction.replyEmbeds(EmbedUtils.genericEmbed().setDescription(
.addField("Guilds", jda.getGuilds().size() + "", true) "**Bot Statistics**\n" +
.addField("Users", jda.getUsers().size() + "", true) "➜ Guilds: %s\n".formatted(jda.getGuilds().size()) +
.addField("Gateway Ping", jda.getGatewayPing() + "ms", true) "➜ Users: %s\n".formatted(jda.getUsers().size()) +
.build()).queue(); "➜ Gateway Ping: %sms".formatted(jda.getGatewayPing())
).build()).queue();
} }
} }