From 42a1d86bf979e6d73e9789ec12a1a3ffd053b0a4 Mon Sep 17 00:00:00 2001 From: tueem Date: Mon, 14 Oct 2024 17:13:18 +0200 Subject: [PATCH] add ApplicationCommandDefinition prototype --- .../ApplicationCommandDefinition.java | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 lib/src/main/java/net/tomatentum/marinara/interaction/commands/ApplicationCommandDefinition.java diff --git a/lib/src/main/java/net/tomatentum/marinara/interaction/commands/ApplicationCommandDefinition.java b/lib/src/main/java/net/tomatentum/marinara/interaction/commands/ApplicationCommandDefinition.java new file mode 100644 index 0000000..8df5248 --- /dev/null +++ b/lib/src/main/java/net/tomatentum/marinara/interaction/commands/ApplicationCommandDefinition.java @@ -0,0 +1,20 @@ +package net.tomatentum.marinara.interaction.commands; + +import java.util.ArrayList; +import java.util.List; + +public record ApplicationCommandDefinition( + List executableDefinitons, + String applicationCommand +) { + + public ApplicationCommandDefinition(String applicationCommand) { + this(new ArrayList<>(), applicationCommand); + } + + public ApplicationCommandDefinition addExecutableCommand(ExecutableCommandDefinition def) { + executableDefinitons.add(def); + return this; + } + +}