[AB-80] added tracking of emotes used by server members and configuration

updated sonar scanner version
changed some commands to be silent instead of adding a check reaction
This commit is contained in:
Sheldan
2020-11-11 17:11:30 +01:00
parent c60cdb9d98
commit 04f1db2408
202 changed files with 7989 additions and 131 deletions

View File

@@ -49,7 +49,7 @@ public class Close extends AbstractConditionableCommand {
String note = parameters.size() == 1 ? (String) parameters.get(0) : templateService.renderTemplate("modmail_close_default_note", new Object());
ModMailThread thread = modMailThreadManagementService.getByChannel(commandContext.getUserInitiatedContext().getChannel());
return modMailThreadService.closeModMailThread(thread, note, true, commandContext.getUndoActions(), true)
.thenApply(aVoid -> CommandResult.fromSuccess());
.thenApply(aVoid -> CommandResult.fromIgnored());
}
@Override

View File

@@ -47,7 +47,7 @@ public class CloseNoLog extends AbstractConditionableCommand {
ModMailThread thread = modMailThreadManagementService.getByChannel(commandContext.getUserInitiatedContext().getChannel());
// we don't have a note, therefore we cant pass any, the method handles this accordingly
return modMailThreadService.closeModMailThread(thread, null, false, commandContext.getUndoActions(), false)
.thenApply(aVoid -> CommandResult.fromSuccess());
.thenApply(aVoid -> CommandResult.fromIgnored());
}
@Override

View File

@@ -46,7 +46,7 @@ public class CloseSilently extends AbstractConditionableCommand {
String note = parameters.size() == 1 ? (String) parameters.get(0) : templateService.renderTemplate("modmail_close_default_note", new Object());
ModMailThread thread = modMailThreadManagementService.getByChannel(commandContext.getUserInitiatedContext().getChannel());
return modMailThreadService.closeModMailThread(thread, note, false, commandContext.getUndoActions(), true)
.thenApply(aVoid -> CommandResult.fromSuccess());
.thenApply(aVoid -> CommandResult.fromIgnored());
}
@Override

View File

@@ -59,7 +59,7 @@ public class Contact extends AbstractConditionableCommand {
ModMailThread existingThread = modMailThreadManagementService.getOpenModMailThreadForUser(user);
model.setExistingModMailThread(existingThread);
List<CompletableFuture<Message>> futures = channelService.sendEmbedTemplateInChannel("modmail_thread_already_exists", model, commandContext.getChannel());
return FutureUtils.toSingleFutureGeneric(futures).thenApply(aVoid -> CommandResult.fromSuccess());
return FutureUtils.toSingleFutureGeneric(futures).thenApply(aVoid -> CommandResult.fromIgnored());
} else {
return modMailThreadService.createModMailThreadForUser(targetUser, null, commandContext.getChannel(), false, commandContext.getUndoActions())
.thenApply(aVoid -> CommandResult.fromSuccess());