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