From aaa2785d37308e17d5da6dd76139ac4b8c46bd09 Mon Sep 17 00:00:00 2001 From: tueem Date: Sun, 13 Oct 2024 14:28:25 +0200 Subject: [PATCH] added Command annotations and OptionType enum --- .../marinara/command/annotation/RootCommand.java | 7 +++++++ .../marinara/command/annotation/SubCommand.java | 7 +++++++ .../command/annotation/SubCommandGroup.java | 6 ++++++ .../marinara/command/option/OptionType.java | 16 ++++++++++++++++ 4 files changed, 36 insertions(+) create mode 100644 lib/src/main/java/net/tomatentum/marinara/command/annotation/RootCommand.java create mode 100644 lib/src/main/java/net/tomatentum/marinara/command/annotation/SubCommand.java create mode 100644 lib/src/main/java/net/tomatentum/marinara/command/annotation/SubCommandGroup.java create mode 100644 lib/src/main/java/net/tomatentum/marinara/command/option/OptionType.java diff --git a/lib/src/main/java/net/tomatentum/marinara/command/annotation/RootCommand.java b/lib/src/main/java/net/tomatentum/marinara/command/annotation/RootCommand.java new file mode 100644 index 0000000..eb1e53c --- /dev/null +++ b/lib/src/main/java/net/tomatentum/marinara/command/annotation/RootCommand.java @@ -0,0 +1,7 @@ +package net.tomatentum.marinara.command.annotation; + +public @interface RootCommand { + public String name(); + public String description() default ""; + public CommandOption[] options() default {}; +} diff --git a/lib/src/main/java/net/tomatentum/marinara/command/annotation/SubCommand.java b/lib/src/main/java/net/tomatentum/marinara/command/annotation/SubCommand.java new file mode 100644 index 0000000..198b7b5 --- /dev/null +++ b/lib/src/main/java/net/tomatentum/marinara/command/annotation/SubCommand.java @@ -0,0 +1,7 @@ +package net.tomatentum.marinara.command.annotation; + +public @interface SubCommand { + public String name(); + public String description() default ""; + public CommandOption[] options() default {}; +} diff --git a/lib/src/main/java/net/tomatentum/marinara/command/annotation/SubCommandGroup.java b/lib/src/main/java/net/tomatentum/marinara/command/annotation/SubCommandGroup.java new file mode 100644 index 0000000..93d9a7d --- /dev/null +++ b/lib/src/main/java/net/tomatentum/marinara/command/annotation/SubCommandGroup.java @@ -0,0 +1,6 @@ +package net.tomatentum.marinara.command.annotation; + +public @interface SubCommandGroup { + public String name(); + public String description() default ""; +} diff --git a/lib/src/main/java/net/tomatentum/marinara/command/option/OptionType.java b/lib/src/main/java/net/tomatentum/marinara/command/option/OptionType.java new file mode 100644 index 0000000..00140cf --- /dev/null +++ b/lib/src/main/java/net/tomatentum/marinara/command/option/OptionType.java @@ -0,0 +1,16 @@ +package net.tomatentum.marinara.command.option; + +public enum OptionType { + ATTACHMENT, + BOOLEAN, + CHANNEL, + DECIMAL, + LONG, + MENTIONABLE, + ROLE, + STRING, + SUB_COMMAND, + SUB_COMMAND_GROUP, + UNKNOW, + USER +}