[AB-xxx] migrating assignable role commands to slash commands

removing separate command for editing assignable role place text, and adding it to the change command
fixing 2 bugs related with deleting assignable roles with users, and deleting assignable role places
refactoring how enums are handled with slash command parameters
adding cleanup for slash command confirmation payloads once they are clicked
This commit is contained in:
Sheldan
2025-02-16 22:30:27 +01:00
parent a8c2dfe15a
commit 8544c0c2b1
48 changed files with 1055 additions and 426 deletions

View File

@@ -19,4 +19,10 @@ public interface CommandParameterKey {
}
throw new IllegalArgumentException("Clazz and key must not be null");
}
static <T extends Enum<T>> List<String> getKeys(Class<T> clazz) {
return Arrays.stream(clazz.getEnumConstants())
.map(Enum::name)
.toList();
}
}

View File

@@ -17,6 +17,7 @@ public interface InteractionService {
List<CompletableFuture<Message>> sendEmbed(String templateKey, InteractionHook interactionHook);
CompletableFuture<Message> replaceOriginal(MessageToSend messageToSend, InteractionHook interactionHook);
CompletableFuture<Message> replaceOriginal(String template, Object model, InteractionHook interactionHook);
CompletableFuture<Void> deleteMessage(InteractionHook interactionHook);
CompletableFuture<InteractionHook> replyMessageToSend(MessageToSend messageToSend, IReplyCallback callback);
CompletableFuture<InteractionHook> replyMessage(String templateKey, Object model, IReplyCallback callback);
CompletableFuture<Message> replyString(String content, InteractionHook interactionHook);