[AB-xxx] adding input to response model for 8ball and choose command

This commit is contained in:
Sheldan
2025-04-26 13:09:34 +02:00
parent fd3bf41406
commit d7125fbf25
4 changed files with 6 additions and 0 deletions

View File

@@ -52,6 +52,7 @@ public class Choose extends AbstractConditionableCommand {
String choice = entertainmentService.takeChoice(choices, commandContext.getAuthor());
ChooseResponseModel responseModel = ChooseResponseModel
.builder()
.choices(choices)
.chosenValue(choice)
.build();
return FutureUtils.toSingleFutureGeneric(channelService.sendEmbedTemplateInMessageChannel(CHOOSE_RESPONSE_TEMPLATE_KEY, responseModel, commandContext.getChannel()))
@@ -70,6 +71,7 @@ public class Choose extends AbstractConditionableCommand {
String choice = entertainmentService.takeChoice(choices, event.getMember());
ChooseResponseModel responseModel = ChooseResponseModel
.builder()
.choices(choices)
.chosenValue(choice)
.build();
return interactionService.replyEmbed(CHOOSE_RESPONSE_TEMPLATE_KEY, responseModel, event)

View File

@@ -56,6 +56,7 @@ public class EightBall extends AbstractConditionableCommand {
String chosenKey = entertainmentService.getEightBallValue(text);
EightBallResponseModel responseModel = EightBallResponseModel
.builder()
.input(text)
.chosenKey(chosenKey)
.build();
return templateService.renderEmbedTemplate(EIGHT_BALL_RESPONSE_TEMPLATE_KEY, responseModel, serverId);

View File

@@ -1,5 +1,6 @@
package dev.sheldan.abstracto.entertainment.model.command;
import java.util.List;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;
@@ -9,4 +10,5 @@ import lombok.Setter;
@Builder
public class ChooseResponseModel {
private String chosenValue;
private List<String> choices;
}

View File

@@ -9,4 +9,5 @@ import lombok.Setter;
@Builder
public class EightBallResponseModel {
private String chosenKey;
private String input;
}