mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-01-01 23:35:29 +00:00
[AB-xxx] adding input to response model for 8ball and choose command
This commit is contained in:
@@ -52,6 +52,7 @@ public class Choose extends AbstractConditionableCommand {
|
|||||||
String choice = entertainmentService.takeChoice(choices, commandContext.getAuthor());
|
String choice = entertainmentService.takeChoice(choices, commandContext.getAuthor());
|
||||||
ChooseResponseModel responseModel = ChooseResponseModel
|
ChooseResponseModel responseModel = ChooseResponseModel
|
||||||
.builder()
|
.builder()
|
||||||
|
.choices(choices)
|
||||||
.chosenValue(choice)
|
.chosenValue(choice)
|
||||||
.build();
|
.build();
|
||||||
return FutureUtils.toSingleFutureGeneric(channelService.sendEmbedTemplateInMessageChannel(CHOOSE_RESPONSE_TEMPLATE_KEY, responseModel, commandContext.getChannel()))
|
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());
|
String choice = entertainmentService.takeChoice(choices, event.getMember());
|
||||||
ChooseResponseModel responseModel = ChooseResponseModel
|
ChooseResponseModel responseModel = ChooseResponseModel
|
||||||
.builder()
|
.builder()
|
||||||
|
.choices(choices)
|
||||||
.chosenValue(choice)
|
.chosenValue(choice)
|
||||||
.build();
|
.build();
|
||||||
return interactionService.replyEmbed(CHOOSE_RESPONSE_TEMPLATE_KEY, responseModel, event)
|
return interactionService.replyEmbed(CHOOSE_RESPONSE_TEMPLATE_KEY, responseModel, event)
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ public class EightBall extends AbstractConditionableCommand {
|
|||||||
String chosenKey = entertainmentService.getEightBallValue(text);
|
String chosenKey = entertainmentService.getEightBallValue(text);
|
||||||
EightBallResponseModel responseModel = EightBallResponseModel
|
EightBallResponseModel responseModel = EightBallResponseModel
|
||||||
.builder()
|
.builder()
|
||||||
|
.input(text)
|
||||||
.chosenKey(chosenKey)
|
.chosenKey(chosenKey)
|
||||||
.build();
|
.build();
|
||||||
return templateService.renderEmbedTemplate(EIGHT_BALL_RESPONSE_TEMPLATE_KEY, responseModel, serverId);
|
return templateService.renderEmbedTemplate(EIGHT_BALL_RESPONSE_TEMPLATE_KEY, responseModel, serverId);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package dev.sheldan.abstracto.entertainment.model.command;
|
package dev.sheldan.abstracto.entertainment.model.command;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
@@ -9,4 +10,5 @@ import lombok.Setter;
|
|||||||
@Builder
|
@Builder
|
||||||
public class ChooseResponseModel {
|
public class ChooseResponseModel {
|
||||||
private String chosenValue;
|
private String chosenValue;
|
||||||
|
private List<String> choices;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,4 +9,5 @@ import lombok.Setter;
|
|||||||
@Builder
|
@Builder
|
||||||
public class EightBallResponseModel {
|
public class EightBallResponseModel {
|
||||||
private String chosenKey;
|
private String chosenKey;
|
||||||
|
private String input;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user