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

View File

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