add ApplicationCommandDefinition prototype
This commit is contained in:
parent
1a4dfff8ec
commit
42a1d86bf9
20
lib/src/main/java/net/tomatentum/marinara/interaction/commands/ApplicationCommandDefinition.java
Normal file
20
lib/src/main/java/net/tomatentum/marinara/interaction/commands/ApplicationCommandDefinition.java
Normal file
@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user