add ApplicationCommandDefinition prototype

This commit is contained in:
tueem 2024-10-14 17:13:18 +02:00
parent 1a4dfff8ec
commit 42a1d86bf9
Signed by: tueem
GPG Key ID: 65C8667EC17A88FB

@ -0,0 +1,20 @@
package net.tomatentum.marinara.interaction.commands;
import java.util.ArrayList;
import java.util.List;
public record ApplicationCommandDefinition(
List<ExecutableCommandDefinition> executableDefinitons,
String applicationCommand
) {
public ApplicationCommandDefinition(String applicationCommand) {
this(new ArrayList<>(), applicationCommand);
}
public ApplicationCommandDefinition addExecutableCommand(ExecutableCommandDefinition def) {
executableDefinitons.add(def);
return this;
}
}