mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-04-05 09:00:24 +00:00
[AB-xx] replacing trace log with debug
This commit is contained in:
@@ -35,7 +35,7 @@ public class Accept extends AbstractConditionableCommand {
|
||||
List<Object> parameters = commandContext.getParameters().getParameters();
|
||||
Long suggestionId = (Long) parameters.get(0);
|
||||
String text = parameters.size() == 2 ? (String) parameters.get(1) : "";
|
||||
log.trace("Using default reason for accept: {}.", parameters.size() != 2);
|
||||
log.debug("Using default reason for accept: {}.", parameters.size() != 2);
|
||||
SuggestionLog suggestionModel = (SuggestionLog) ContextConverter.fromCommandContext(commandContext, SuggestionLog.class);
|
||||
return suggestionService.acceptSuggestion(suggestionId, text, suggestionModel)
|
||||
.thenApply(aVoid -> CommandResult.fromSuccess());
|
||||
|
||||
@@ -35,7 +35,7 @@ public class Reject extends AbstractConditionableCommand {
|
||||
List<Object> parameters = commandContext.getParameters().getParameters();
|
||||
Long suggestionId = (Long) parameters.get(0);
|
||||
String text = parameters.size() == 2 ? (String) parameters.get(1) : "";
|
||||
log.trace("Using default reason for accept: {}.", parameters.size() != 2);
|
||||
log.debug("Using default reason for accept: {}.", parameters.size() != 2);
|
||||
SuggestionLog suggestionModel = (SuggestionLog) ContextConverter.fromCommandContext(commandContext, SuggestionLog.class);
|
||||
return suggestionService.rejectSuggestion(suggestionId, text, suggestionModel)
|
||||
.thenApply(aVoid -> CommandResult.fromSuccess());
|
||||
|
||||
@@ -83,11 +83,11 @@ public class SuggestionServiceBean implements SuggestionService {
|
||||
List<CompletableFuture<Message>> completableFutures = postTargetService.sendEmbedInPostTarget(messageToSend, SuggestionPostTarget.SUGGESTION, guildId);
|
||||
return FutureUtils.toSingleFutureGeneric(completableFutures).thenCompose(aVoid -> {
|
||||
Message message = completableFutures.get(0).join();
|
||||
log.trace("Posted message, adding reaction for suggestion {} to message {}.", newSuggestionId, message.getId());
|
||||
log.debug("Posted message, adding reaction for suggestion {} to message {}.", newSuggestionId, message.getId());
|
||||
CompletableFuture<Void> firstReaction = reactionService.addReactionToMessageAsync(SUGGESTION_YES_EMOTE, guildId, message);
|
||||
CompletableFuture<Void> secondReaction = reactionService.addReactionToMessageAsync(SUGGESTION_NO_EMOTE, guildId, message);
|
||||
return CompletableFuture.allOf(firstReaction, secondReaction).thenAccept(aVoid1 -> {
|
||||
log.trace("Reaction added to message {} for suggestion {}.", message.getId(), newSuggestionId);
|
||||
log.debug("Reaction added to message {} for suggestion {}.", message.getId(), newSuggestionId);
|
||||
self.persistSuggestionInDatabase(member, text, message, newSuggestionId);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user