[AB-xxx] enabling localization by adding the localization as a system config key

fixing methods which did not provide the server id to template rendering
refactoring channel service method to remove a duplicate
fixing template loading method to not throw an exception when template was not found
This commit is contained in:
Sheldan
2024-11-22 21:54:13 +01:00
parent 0e95ddf198
commit 453378f0b6
72 changed files with 181 additions and 172 deletions

View File

@@ -11,6 +11,7 @@ import java.util.List;
public class CoreFeatureConfig implements FeatureConfig {
public static final String NO_COMMAND_REPORTING_CONFIG_KEY = "noCommandFoundReporting";
public static final String LOCALE_CONFIG_KEY = "locale";
public static final String SUCCESS_REACTION_KEY = "successReaction";
public static final String WARN_REACTION_KEY = "warnReaction";
public static final String MAX_MESSAGES_KEY = "maxMessages";
@@ -28,6 +29,6 @@ public class CoreFeatureConfig implements FeatureConfig {
@Override
public List<String> getRequiredSystemConfigKeys() {
return Arrays.asList(NO_COMMAND_REPORTING_CONFIG_KEY, MAX_MESSAGES_KEY, CONFIRMATION_TIMEOUT);
return Arrays.asList(NO_COMMAND_REPORTING_CONFIG_KEY, MAX_MESSAGES_KEY, CONFIRMATION_TIMEOUT, LOCALE_CONFIG_KEY);
}
}

View File

@@ -53,9 +53,7 @@ public interface ChannelService {
CompletableFuture<Void> archiveThreadChannel(ThreadChannel threadChannel);
CompletableFuture<Void> deleteTextChannel(AChannel channel);
CompletableFuture<Void> deleteTextChannel(Long serverId, Long channelId);
List<CompletableFuture<Message>> sendEmbedTemplateInTextChannelList(String templateKey, Object model, MessageChannel channel);
List<CompletableFuture<Message>> sendEmbedTemplateInMessageChannelList(String templateKey, Object model, MessageChannel channel);
CompletableFuture<Message> sendTextTemplateInTextChannel(String templateKey, Object model, MessageChannel channel);
List<CompletableFuture<Message>> sendEmbedTemplateInMessageChannel(String templateKey, Object model, MessageChannel channel);
CompletableFuture<Message> sendTextTemplateInMessageChannel(String templateKey, Object model, MessageChannel channel);
CompletableFuture<Void> deleteMessagesInChannel(MessageChannel messageChannel, List<Message> messages);