mirror of
https://github.com/Sheldan/OnePlusBot.git
synced 2026-01-01 07:27:30 +00:00
[OPB-xxx] updating abstracto version to 1.5.51
adapting templates to use the default locale
This commit is contained in:
2
.env
2
.env
@@ -1,4 +1,4 @@
|
||||
REGISTRY_PREFIX=harbor.sheldan.dev/oneplus-bot/
|
||||
ABSTRACTO_PREFIX=harbor.sheldan.dev/abstracto/
|
||||
VERSION=1.6.33
|
||||
ABSTRACTO_VERSION=1.5.50
|
||||
ABSTRACTO_VERSION=1.5.51
|
||||
@@ -66,14 +66,14 @@ public class FAQ extends AbstractConditionableCommand {
|
||||
.forEach(faqResponseMessageModel ->
|
||||
messageFutures.add(FutureUtils.
|
||||
toSingleFutureGeneric(channelService.
|
||||
sendEmbedTemplateInTextChannelList(FAQ_RESPONSE_TEMPLATE_KEY,
|
||||
sendEmbedTemplateInMessageChannel(FAQ_RESPONSE_TEMPLATE_KEY,
|
||||
faqResponseMessageModel, commandContext.getChannel()))));
|
||||
return FutureUtils.toSingleFutureGeneric(messageFutures);
|
||||
} else {
|
||||
return FutureUtils
|
||||
.toSingleFutureGeneric(
|
||||
channelService.
|
||||
sendEmbedTemplateInTextChannelList(FAQ_RESPONSE_NO_COMMAND_FOUND_TEMPLATE_KEY,
|
||||
sendEmbedTemplateInMessageChannel(FAQ_RESPONSE_NO_COMMAND_FOUND_TEMPLATE_KEY,
|
||||
faqResponseModel, commandContext.getChannel()));
|
||||
}
|
||||
})
|
||||
@@ -85,7 +85,7 @@ public class FAQ extends AbstractConditionableCommand {
|
||||
return FutureUtils
|
||||
.toSingleFutureGeneric(
|
||||
channelService.
|
||||
sendEmbedTemplateInTextChannelList(FAQ_RESPONSE_NO_COMMAND_FOUND_TEMPLATE_KEY,
|
||||
sendEmbedTemplateInMessageChannel(FAQ_RESPONSE_NO_COMMAND_FOUND_TEMPLATE_KEY,
|
||||
model, commandContext.getChannel()))
|
||||
.thenApply(unused -> CommandResult.fromSuccess());
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ public class FAQUsage extends AbstractConditionableCommand {
|
||||
model = faqUsageServiceBean.getFAQUsageModel(server, commandName);
|
||||
}
|
||||
|
||||
return FutureUtils.toSingleFutureGeneric(channelService.sendEmbedTemplateInTextChannelList(FAQ_USAGE_RESPONSE_TEMPLATE_KEY, model, commandContext.getChannel()))
|
||||
return FutureUtils.toSingleFutureGeneric(channelService.sendEmbedTemplateInMessageChannel(FAQ_USAGE_RESPONSE_TEMPLATE_KEY, model, commandContext.getChannel()))
|
||||
.thenApply(unused -> CommandResult.fromSuccess());
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ public class ListFAQCommands extends AbstractConditionableCommand {
|
||||
public CompletableFuture<CommandResult> executeAsync(CommandContext commandContext) {
|
||||
AServer server = serverManagementService.loadServer(commandContext.getGuild());
|
||||
ListFAQCommandsModel model = faqServiceBean.getCommandListingForServer(server);
|
||||
return FutureUtils.toSingleFutureGeneric(channelService.sendEmbedTemplateInTextChannelList(LIST_FAQ_COMMANDS_RESPONSE_TEMPLATE_KEY, model, commandContext.getChannel()))
|
||||
return FutureUtils.toSingleFutureGeneric(channelService.sendEmbedTemplateInMessageChannel(LIST_FAQ_COMMANDS_RESPONSE_TEMPLATE_KEY, model, commandContext.getChannel()))
|
||||
.thenApply(unused -> CommandResult.fromSuccess());
|
||||
}
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ public class ReferralListener implements AsyncMessageReceivedListener {
|
||||
.build();
|
||||
ServerUser serverUser = ServerUser.fromMember(message.getMember());
|
||||
CompletableFutureList<Message> sendFutures = new CompletableFutureList<>(channelService
|
||||
.sendEmbedTemplateInMessageChannelList(REFERRAL_POST_EMBED_TEMPLATE_KEY, postModel, message.getChannel()));
|
||||
.sendEmbedTemplateInMessageChannel(REFERRAL_POST_EMBED_TEMPLATE_KEY, postModel, message.getChannel()));
|
||||
CompletableFuture<Void> deletionFuture = messageService.deleteMessage(message);
|
||||
CompletableFuture.allOf(sendFutures.getMainFuture(), deletionFuture)
|
||||
.thenAccept(unused -> self.updateReferralStateInDatabase(serverUser))
|
||||
@@ -139,7 +139,7 @@ public class ReferralListener implements AsyncMessageReceivedListener {
|
||||
|
||||
private void deleteAndNotify(Message message, String usedTemplate, Object usedModel) {
|
||||
CompletableFutureList<Message> futures = new CompletableFutureList<>(channelService
|
||||
.sendEmbedTemplateInMessageChannelList(usedTemplate, usedModel, message.getChannel()));
|
||||
.sendEmbedTemplateInMessageChannel(usedTemplate, usedModel, message.getChannel()));
|
||||
futures.getMainFuture().thenAccept(unused ->
|
||||
scheduledExecutorService.schedule(() ->
|
||||
futures.getObjects().forEach(createdMessage -> messageService.deleteMessage(createdMessage)),
|
||||
|
||||
@@ -22,7 +22,7 @@ templateDeployment:
|
||||
repository: harbor.sheldan.dev/abstracto
|
||||
pullPolicy: Always
|
||||
image: abstracto-template-deployment
|
||||
tag: 1.5.50
|
||||
tag: 1.5.51
|
||||
templateDeploymentData:
|
||||
repository: harbor.sheldan.dev/oneplus-bot
|
||||
pullPolicy: Always
|
||||
@@ -33,7 +33,7 @@ dbConfigDeployment:
|
||||
repository: harbor.sheldan.dev/abstracto
|
||||
pullPolicy: Always
|
||||
image: abstracto-db-deployment
|
||||
tag: 1.5.50
|
||||
tag: 1.5.51
|
||||
dbConfigDeploymentData:
|
||||
repository: harbor.sheldan.dev/oneplus-bot
|
||||
pullPolicy: Always
|
||||
|
||||
4
pom.xml
4
pom.xml
@@ -17,8 +17,8 @@
|
||||
<properties>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<abstracto.version>1.5.50</abstracto.version>
|
||||
<abstracto.templates.version>1.4.45</abstracto.templates.version>
|
||||
<abstracto.version>1.5.51</abstracto.version>
|
||||
<abstracto.templates.version>1.4.46</abstracto.templates.version>
|
||||
</properties>
|
||||
|
||||
<modules>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user