mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-04-05 00:53:04 +00:00
[AB-218] adding ability to split the normal message as well according to custom configuration
adding ability to define the max amount of messages resulting from a template on a server and template base fixing not always considering the server when rendering templates in various places
This commit is contained in:
@@ -77,7 +77,7 @@ public class SuggestionServiceBean implements SuggestionService {
|
||||
suggestionLog.setState(SuggestionState.NEW);
|
||||
suggestionLog.setSuggesterUser(suggester);
|
||||
suggestionLog.setText(text);
|
||||
MessageToSend messageToSend = templateService.renderEmbedTemplate(SUGGESTION_LOG_TEMPLATE, suggestionLog);
|
||||
MessageToSend messageToSend = templateService.renderEmbedTemplate(SUGGESTION_LOG_TEMPLATE, suggestionLog, member.getGuild().getIdLong());
|
||||
long guildId = member.getGuild().getIdLong();
|
||||
log.info("Creating suggestion with id {} in server {} from member {}.", newSuggestionId, member.getGuild().getId(), member.getId());
|
||||
List<CompletableFuture<Message>> completableFutures = postTargetService.sendEmbedInPostTarget(messageToSend, SuggestionPostTarget.SUGGESTION, guildId);
|
||||
@@ -144,7 +144,7 @@ public class SuggestionServiceBean implements SuggestionService {
|
||||
MessageEmbed suggestionEmbed = embedOptional.get();
|
||||
suggestionLog.setReason(text);
|
||||
suggestionLog.setText(suggestionEmbed.getDescription());
|
||||
MessageToSend messageToSend = templateService.renderEmbedTemplate(SUGGESTION_LOG_TEMPLATE, suggestionLog);
|
||||
MessageToSend messageToSend = templateService.renderEmbedTemplate(SUGGESTION_LOG_TEMPLATE, suggestionLog, suggestionLog.getGuild().getIdLong());
|
||||
List<CompletableFuture<Message>> completableFutures = postTargetService.sendEmbedInPostTarget(messageToSend, SuggestionPostTarget.SUGGESTION, suggestionLog.getGuild().getIdLong());
|
||||
return CompletableFuture.allOf(completableFutures.toArray(new CompletableFuture[0]));
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user