[AB-99/AB-66] changed commands to use embeds for exceptions instead of direct messages

added models instead of using HashMaps for exceptions
added a lot of exceptions for different cases
refactored a few commands to be fully async instead of fire and forget
This commit is contained in:
Sheldan
2020-08-29 01:24:06 +02:00
parent fbb36ae9d5
commit 552ecc26b8
285 changed files with 1607 additions and 847 deletions

View File

@@ -31,6 +31,11 @@ public class CommandTestUtilities {
com.execute(context);
}
public static void executeAsyncNoParametersTest(Command com) {
CommandContext context = CommandTestUtilities.getNoParameters();
com.executeAsync(context);
}
public static void executeWrongParametersTest(Command com) {
executeWrongParametersTest(com, new ArrayList<>());
}
@@ -40,6 +45,15 @@ public class CommandTestUtilities {
com.execute(context);
}
public static void executeAsyncWrongParametersTest(Command com) {
executeAsyncWrongParametersTest(com, new ArrayList<>());
}
public static void executeAsyncWrongParametersTest(Command com, Object value) {
CommandContext context = CommandTestUtilities.getWithParameters(Arrays.asList(value));
com.executeAsync(context);
}
public static CommandContext getNoParameters() {
AServer server = MockUtils.getServer();
AUserInAServer author = MockUtils.getUserObject(3L, server);