Compare commits

..

No commits in common. "78bdadad0627e074cf7bc759252270281acf7c71" and "64f0b611ca50d3cbee43f2bdeccf072213deb711" have entirely different histories.

3 changed files with 12 additions and 30 deletions

View File

@ -38,11 +38,4 @@ commands support both systems, but some of them are limited in one way or anothe
The bot currently supports SQLite as a database backend. A database file will be created after the first boot The bot currently supports SQLite as a database backend. A database file will be created after the first boot
in your current directory. Do not delete the database file to avoid corruption and unpredictable in your current directory. Do not delete the database file to avoid corruption and unpredictable
behavior. behavior.
# Development
## Versioning
This project uses the `x.y.z-releaseType` schema for releases.
Development builds are tagged as `x.y.z-SNAPSHOT` and sometimes pushed to the snapshots Maven repository.
Stable builds are tagged as `x.y.z` and always pushed to the releases Maven repository, by promoting the build on
[Drone](https://drone.beatrice.wtf/). Currently, promoting stable builds is a manual process.

View File

@ -6,7 +6,7 @@
<groupId>wtf.beatrice.hidekobot</groupId> <groupId>wtf.beatrice.hidekobot</groupId>
<artifactId>HidekoBot</artifactId> <artifactId>HidekoBot</artifactId>
<version>0.5.19-SNAPSHOT</version> <version>0.5.18</version>
<properties> <properties>
<maven.compiler.source>16</maven.compiler.source> <maven.compiler.source>16</maven.compiler.source>

View File

@ -5,7 +5,6 @@ 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;
@ -49,35 +48,25 @@ 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 field // message commands info fields
String messageCommandsInfo; StringBuilder messageCommandsInfoBuilder = new StringBuilder();
if(Cache.getMessageCommandListener() == null) if(Cache.getMessageCommandListener() == null)
messageCommandsInfo = "❌ disabled"; messageCommandsInfoBuilder.append("❌ disabled");
else { else {
messageCommandsInfo = "✅ available"; messageCommandsInfoBuilder.append("✅ available");
commandsCount += Cache.getMessageCommandListener().getRegisteredCommands().size(); commandsCount += Cache.getMessageCommandListener().getRegisteredCommands().size();
} }
embedBuilder.addField("Message commands", messageCommandsInfo, true); embedBuilder.addField("Message commands", messageCommandsInfoBuilder.toString(), true);
// slash commands info field // slash commands info fields
String slashCommandsInfo; StringBuilder slashCommandsInfoBuilder = new StringBuilder();
if(Cache.getMessageCommandListener() == null) if(Cache.getMessageCommandListener() == null)
slashCommandsInfo = "❌ disabled"; slashCommandsInfoBuilder.append("❌ disabled");
else { else {
slashCommandsInfo = "✅ available"; slashCommandsInfoBuilder.append("✅ available");
commandsCount += Cache.getSlashCommandListener().getRegisteredCommands().size(); commandsCount += Cache.getSlashCommandListener().getRegisteredCommands().size();
} }
embedBuilder.addField("Slash commands", slashCommandsInfo, true); embedBuilder.addField("Slash commands", slashCommandsInfoBuilder.toString(), 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);