Add info about random.org
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
a5b9f9d993
commit
78bdadad06
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>wtf.beatrice.hidekobot</groupId>
|
<groupId>wtf.beatrice.hidekobot</groupId>
|
||||||
<artifactId>HidekoBot</artifactId>
|
<artifactId>HidekoBot</artifactId>
|
||||||
<version>0.5.18</version>
|
<version>0.5.19-SNAPSHOT</version>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.source>16</maven.compiler.source>
|
<maven.compiler.source>16</maven.compiler.source>
|
||||||
|
@ -5,6 +5,7 @@ import net.dv8tion.jda.api.entities.MessageEmbed;
|
|||||||
import wtf.beatrice.hidekobot.Cache;
|
import wtf.beatrice.hidekobot.Cache;
|
||||||
import wtf.beatrice.hidekobot.HidekoBot;
|
import wtf.beatrice.hidekobot.HidekoBot;
|
||||||
import wtf.beatrice.hidekobot.util.FormatUtil;
|
import wtf.beatrice.hidekobot.util.FormatUtil;
|
||||||
|
import wtf.beatrice.hidekobot.util.RandomUtil;
|
||||||
|
|
||||||
import java.lang.management.ManagementFactory;
|
import java.lang.management.ManagementFactory;
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
@ -48,25 +49,35 @@ public class BotInfo
|
|||||||
// keep track of how many total commands we have
|
// keep track of how many total commands we have
|
||||||
int commandsCount = 0;
|
int commandsCount = 0;
|
||||||
|
|
||||||
// message commands info fields
|
// message commands info field
|
||||||
StringBuilder messageCommandsInfoBuilder = new StringBuilder();
|
String messageCommandsInfo;
|
||||||
if(Cache.getMessageCommandListener() == null)
|
if(Cache.getMessageCommandListener() == null)
|
||||||
messageCommandsInfoBuilder.append("❌ disabled");
|
messageCommandsInfo = "❌ disabled";
|
||||||
else {
|
else {
|
||||||
messageCommandsInfoBuilder.append("✅ available");
|
messageCommandsInfo = "✅ available";
|
||||||
commandsCount += Cache.getMessageCommandListener().getRegisteredCommands().size();
|
commandsCount += Cache.getMessageCommandListener().getRegisteredCommands().size();
|
||||||
}
|
}
|
||||||
embedBuilder.addField("Message commands", messageCommandsInfoBuilder.toString(), true);
|
embedBuilder.addField("Message commands", messageCommandsInfo, true);
|
||||||
|
|
||||||
// slash commands info fields
|
// slash commands info field
|
||||||
StringBuilder slashCommandsInfoBuilder = new StringBuilder();
|
String slashCommandsInfo;
|
||||||
if(Cache.getMessageCommandListener() == null)
|
if(Cache.getMessageCommandListener() == null)
|
||||||
slashCommandsInfoBuilder.append("❌ disabled");
|
slashCommandsInfo = "❌ disabled";
|
||||||
else {
|
else {
|
||||||
slashCommandsInfoBuilder.append("✅ available");
|
slashCommandsInfo = "✅ available";
|
||||||
commandsCount += Cache.getSlashCommandListener().getRegisteredCommands().size();
|
commandsCount += Cache.getSlashCommandListener().getRegisteredCommands().size();
|
||||||
}
|
}
|
||||||
embedBuilder.addField("Slash commands", slashCommandsInfoBuilder.toString(), true);
|
embedBuilder.addField("Slash commands", slashCommandsInfo, true);
|
||||||
|
|
||||||
|
// random.org integration field
|
||||||
|
String randomOrgInfo;
|
||||||
|
if(RandomUtil.isRandomOrgKeyValid())
|
||||||
|
{
|
||||||
|
randomOrgInfo = "✅ connected";
|
||||||
|
} else {
|
||||||
|
randomOrgInfo = "❌ disabled";
|
||||||
|
}
|
||||||
|
embedBuilder.addField("Random.org", randomOrgInfo, true);
|
||||||
|
|
||||||
// commands count fields
|
// commands count fields
|
||||||
embedBuilder.addField("Total commands", "Loaded: `" + commandsCount + "`", true);
|
embedBuilder.addField("Total commands", "Loaded: `" + commandsCount + "`", true);
|
||||||
|
Loading…
Reference in New Issue
Block a user