[AB-xxx] updating JDA version

This commit is contained in:
Sheldan
2024-03-17 12:59:16 +01:00
parent dbf5d99622
commit 972a2829d7
3 changed files with 5 additions and 5 deletions

View File

@@ -12,7 +12,7 @@ An example implementation of this bot can be seen [here](https://github.com/Shel
## Technologies
* [JDA](https://github.com/DV8FromTheWorld/JDA/) The Discord API Wrapper in the version 5.0.0-beta.13
* [JDA](https://github.com/DV8FromTheWorld/JDA/) The Discord API Wrapper in the version 5.0.0-beta.21
* [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.

View File

@@ -340,7 +340,7 @@ public class PollServiceBean implements PollService {
List<PollMessageOption> options = getOptionsOfPoll(poll);
ServerPollMessageModel model = ServerPollMessageModel.fromPoll(poll, options);
MessageToSend messageToSend = templateService.renderEmbedTemplate(SERVER_POLL_TEMPLATE_KEY, model);
MessageChannel pollChannel = adder.getGuild().getChannelById(MessageChannel.class, poll.getChannel().getId());
MessageChannel pollChannel = adder.getGuild().getChannelById(GuildMessageChannel.class, poll.getChannel().getId());
List<CompletableFuture<Message>> messageFutures = channelService.editMessagesInAChannelFuture(messageToSend, pollChannel, Arrays.asList(poll.getMessageId()));
return FutureUtils.toSingleFutureGeneric(messageFutures);
}
@@ -528,7 +528,7 @@ public class PollServiceBean implements PollService {
model.setShowDecisions(true);
model.setAllowMultiple(false);
MessageToSend messageToSend = templateService.renderEmbedTemplate(SERVER_POLL_TEMPLATE_KEY, model);
MessageChannel pollChannel = guild.getChannelById(MessageChannel.class, poll.getChannel().getId());
MessageChannel pollChannel = guild.getChannelById(GuildMessageChannel.class, poll.getChannel().getId());
return channelService.editEmbedMessageInAChannel(messageToSend.getEmbeds().get(0), pollChannel, poll.getMessageId())
.thenApply(message -> null);
}
@@ -537,7 +537,7 @@ public class PollServiceBean implements PollService {
List<PollMessageOption> options = getOptionsOfPoll(poll);
ServerPollMessageModel model = ServerPollMessageModel.fromPoll(poll, options);
MessageToSend messageToSend = templateService.renderEmbedTemplate(SERVER_POLL_TEMPLATE_KEY, model);
MessageChannel pollChannel = guild.getChannelById(MessageChannel.class, poll.getChannel().getId());
MessageChannel pollChannel = guild.getChannelById(GuildMessageChannel.class, poll.getChannel().getId());
return channelService.editEmbedMessageInAChannel(messageToSend.getEmbeds().get(0), pollChannel, poll.getMessageId())
.thenApply(message -> null);
}

View File

@@ -55,7 +55,7 @@
<properties>
<maven.build.timestamp.format>yyyy/MM/dd HH:mm</maven.build.timestamp.format>
<jda.version>5.0.0-beta.13</jda.version>
<jda.version>5.0.0-beta.21</jda.version>
<asciidoctor.maven.plugin.version>2.0.0-RC.1</asciidoctor.maven.plugin.version>
<asciidoctorj.pdf.version>1.5.3</asciidoctorj.pdf.version>
<asciidoctorj.version>2.3.0</asciidoctorj.version>