Skip to content

Commit

Permalink
Cleanup commands and quickstart (#353)
Browse files Browse the repository at this point in the history
* Cleanup commands and quickstart

* Cleanup commands and quickstart
  • Loading branch information
twonirwana authored Nov 1, 2023
1 parent fc31b9b commit 8168e27
Show file tree
Hide file tree
Showing 16 changed files with 322 additions and 492 deletions.
272 changes: 86 additions & 186 deletions README.adoc

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bot/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repositories {
dependencies {
implementation(project(":discord-connector"))
implementation("com.github.twonirwana:dice-parser:0.7.1")
implementation("io.github.twonirwana:dice-evaluator:v0.5.0")
implementation("io.github.twonirwana:dice-evaluator:v0.5.1")

implementation(libs.log4j.to.slf4j)
implementation(libs.reactor.core)
Expand Down
4 changes: 2 additions & 2 deletions bot/src/main/java/de/janno/discord/bot/Bot.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
import de.janno.discord.bot.command.directRoll.ValidationCommand;
import de.janno.discord.bot.command.fate.FateCommand;
import de.janno.discord.bot.command.help.HelpCommand;
import de.janno.discord.bot.command.help.RpgSystemCommandPreset;
import de.janno.discord.bot.command.help.QuickstartCommand;
import de.janno.discord.bot.command.help.RpgSystemCommandPreset;
import de.janno.discord.bot.command.help.WelcomeCommand;
import de.janno.discord.bot.command.holdReroll.HoldRerollCommand;
import de.janno.discord.bot.command.poolTarget.PoolTargetCommand;
Expand Down Expand Up @@ -64,7 +64,7 @@ public static void main(final String[] args) throws Exception {
CustomParameterCommand customParameterCommand = new CustomParameterCommand(persistenceManager, cachingDiceEvaluator);
SumCustomSetCommand sumCustomSetCommand = new SumCustomSetCommand(persistenceManager, cachingDiceEvaluator);
PoolTargetCommand poolTargetCommand = new PoolTargetCommand(persistenceManager);
RpgSystemCommandPreset rpgSystemCommandPreset = new RpgSystemCommandPreset(persistenceManager, customParameterCommand, fateCommand, customDiceCommand, countSuccessesCommand, sumCustomSetCommand, poolTargetCommand);
RpgSystemCommandPreset rpgSystemCommandPreset = new RpgSystemCommandPreset(persistenceManager, customParameterCommand, customDiceCommand, sumCustomSetCommand);

WelcomeCommand welcomeCommand = new WelcomeCommand(persistenceManager, rpgSystemCommandPreset);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,14 @@ public boolean matchingComponentCustomId(@NonNull String buttonCustomId) {
.description(getCommandDescription())
.option(CommandDefinitionOption.builder()
.name(ACTION_START)
.description("Start")
.description(getCommandDescription())
.type(CommandDefinitionOption.Type.SUB_COMMAND)
.options(getStartOptions())
.options(baseOptions)
.build())
.option(CommandDefinitionOption.builder()
.name(ACTION_HELP)
.description("Help")
.description("Get help for " + getCommandId())
.type(CommandDefinitionOption.Type.SUB_COMMAND)
.build())
.options(additionalCommandOptions())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@ public Optional<MessageConfigDTO> createMessageConfig(@NonNull UUID configUUID,

@Override
protected @NonNull String getCommandDescription() {
return "Configure buttons for dice, with the same side, that counts successes against a target number";
return "Legacy command, use /custom_parameter";
}

@Override
protected @NonNull EmbedOrMessageDefinition getHelpMessage() {
return EmbedOrMessageDefinition.builder().descriptionOrContent("Use '/count_successes start dice_sides:X target_number:Y' to get Buttons that roll with X sided dice against the target of Y and count the successes. A successes are all dice that have a result greater or equal then the target number")
return EmbedOrMessageDefinition.builder().descriptionOrContent("**Legacy command, use /custom_parameter**")
.field(new EmbedOrMessageDefinition.Field("Example", "`/count_successes start dice_sides:10 target_number:7`", false))
.field(new EmbedOrMessageDefinition.Field("Full documentation", "https://github.com/twonirwana/DiscordDiceBot", false))
.field(new EmbedOrMessageDefinition.Field("Discord Server for Help and News", "https://discord.gg/e43BsqKpFr", false))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public Optional<MessageConfigDTO> createMessageConfig(@NonNull UUID configUUID,

@Override
protected @NonNull String getCommandDescription() {
return "Configure Fate dice";
return "Legacy command, use /custom_parameter or /custom_dice";
}

@Override
Expand All @@ -94,9 +94,7 @@ private String createButtonMessage(FateConfig config) {
@Override
protected @NonNull EmbedOrMessageDefinition getHelpMessage() {
return EmbedOrMessageDefinition.builder()
.descriptionOrContent("Buttons for Fate/Fudge dice. There are two types, the simple produces one button that rolls four dice and " +
"provides the result together with the sum. The type with_modifier produces multiple buttons for modifier -4 to +10" +
" that roll four dice and add the modifier of the button.")
.descriptionOrContent("**Legacy command, use /custom_parameter or /custom_dice**")
.field(new EmbedOrMessageDefinition.Field("Example", "`/fate start type:with_modifier` or `/fate start type:simple`", false))
.field(new EmbedOrMessageDefinition.Field("Full documentation", "https://github.com/twonirwana/DiscordDiceBot", false))
.field(new EmbedOrMessageDefinition.Field("Discord Server for Help and News", "https://discord.gg/e43BsqKpFr", false))
Expand Down
Loading

0 comments on commit 8168e27

Please sign in to comment.