mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-04-13 11:31:38 +00:00
[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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user