[AB-78] adding new concept of feature modes, with splitting it up to new commands and default mode concept

refactoring command received handler to only load the entities in the same thread as the actual executed commands, so that user initiated context contains valid references from the same thread
updating documentation
fixing issue when the result of role calculation result in no experience role id
This commit is contained in:
Sheldan
2020-10-15 00:42:42 +02:00
parent bc9afc9bfc
commit 0aa7d3f036
134 changed files with 1934 additions and 473 deletions

View File

@@ -48,7 +48,7 @@ public class ModMailFeature implements FeatureConfig {
@Override
public List<FeatureMode> getAvailableModes() {
return Arrays.asList(ModMailMode.LOGGING, ModMailMode.NO_LOG);
return Arrays.asList(ModMailMode.LOGGING);
}
@Override

View File

@@ -9,7 +9,7 @@ import lombok.Getter;
*/
@Getter
public enum ModMailMode implements FeatureMode {
LOGGING("log"), NO_LOG("nolog");
LOGGING("log");
private String key;

View File

@@ -75,8 +75,9 @@ public interface ModMailThreadService {
* @param modMailThread The {@link ModMailThread} which is being closed.
* @param note The text of the note used for the header message of the logged mod mail thread.
* @param notifyUser Whether or not the user should be notified
* @param log whether or not the closed {@link ModMailThread} should be logged (if the {@link dev.sheldan.abstracto.core.config.FeatureMode} is enabled)
*/
CompletableFuture<Void> closeModMailThread(ModMailThread modMailThread, String note, boolean notifyUser, List<UndoActionInstance> undoActions);
CompletableFuture<Void> closeModMailThread(ModMailThread modMailThread, String note, boolean notifyUser, List<UndoActionInstance> undoActions, Boolean log);
/**
* Closes the mod mail thread which means: deletes the {@link net.dv8tion.jda.api.entities.TextChannel} associated with the mod mail thread,