mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-01-26 13:46:19 +00:00
Compare commits
2 Commits
fd3bf41406
...
db73071a71
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
db73071a71 | ||
|
|
d7125fbf25 |
@@ -11,7 +11,7 @@ This repository does not provide the full functionality in order to start a disc
|
||||
|
||||
|
||||
## Technologies
|
||||
* [JDA](https://github.com/DV8FromTheWorld/JDA/) The Discord API Wrapper in the version 5.3.1
|
||||
* [JDA](https://github.com/DV8FromTheWorld/JDA/) The Discord API Wrapper in the version 5.4.0
|
||||
* [Spring boot](https://github.com/spring-projects/spring-boot) is used as a framework to create standalone application in Java with Java EE methods. (including dependency injection and more)
|
||||
* [Hibernate](https://github.com/hibernate/hibernate-orm) is used as a reference implementation of JPA.
|
||||
* [Freemarker](https://github.com/apache/freemarker) is used as a templating engine. This is used to provide internationalization for user facing text and enable dynamic embed configuration.
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -9,4 +9,5 @@ import lombok.Setter;
|
||||
@Builder
|
||||
public class EightBallResponseModel {
|
||||
private String chosenKey;
|
||||
private String input;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
<properties>
|
||||
<maven.build.timestamp.format>yyyy/MM/dd HH:mm</maven.build.timestamp.format>
|
||||
<jda.version>5.3.1</jda.version>
|
||||
<jda.version>5.4.0</jda.version>
|
||||
<asciidoctor.maven.plugin.version>2.2.6</asciidoctor.maven.plugin.version>
|
||||
<asciidoctorj.pdf.version>1.5.3</asciidoctorj.pdf.version>
|
||||
<asciidoctorj.version>2.3.0</asciidoctorj.version>
|
||||
|
||||
Reference in New Issue
Block a user