From 67a242650233439c9c6122a18bd6d400559a263c Mon Sep 17 00:00:00 2001 From: Hammy Date: Tue, 21 Sep 2021 01:46:21 +0100 Subject: [PATCH] Update command annotations --- .../java/me/goudham/command/annotation/SlashCommand.java | 6 ++---- src/main/java/me/goudham/command/annotation/SubCommand.java | 6 +++--- .../java/me/goudham/command/annotation/SubCommandGroup.java | 6 ++++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/java/me/goudham/command/annotation/SlashCommand.java b/src/main/java/me/goudham/command/annotation/SlashCommand.java index beaf6d8b..7cbadb51 100644 --- a/src/main/java/me/goudham/command/annotation/SlashCommand.java +++ b/src/main/java/me/goudham/command/annotation/SlashCommand.java @@ -1,6 +1,5 @@ package me.goudham.command.annotation; -import io.micronaut.core.annotation.Introspected; import jakarta.inject.Qualifier; import jakarta.inject.Singleton; import java.lang.annotation.ElementType; @@ -9,7 +8,6 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Singleton -@Introspected @Qualifier @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) @@ -17,7 +15,7 @@ public @interface SlashCommand { String name(); String description(); boolean isVisible(); - SubCommandGroup[] subCommandGroups() default {}; - SubCommand[] subCommands() default {}; + String[] subCommandGroups() default {}; + String[] subCommands() default {}; Option[] options() default {}; } diff --git a/src/main/java/me/goudham/command/annotation/SubCommand.java b/src/main/java/me/goudham/command/annotation/SubCommand.java index 088446fd..2797dca8 100644 --- a/src/main/java/me/goudham/command/annotation/SubCommand.java +++ b/src/main/java/me/goudham/command/annotation/SubCommand.java @@ -1,15 +1,15 @@ package me.goudham.command.annotation; import jakarta.inject.Qualifier; -import java.lang.annotation.ElementType; +import jakarta.inject.Singleton; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; +@Singleton @Qualifier -@Target(ElementType.ANNOTATION_TYPE) @Retention(RetentionPolicy.RUNTIME) public @interface SubCommand { + String commandParent() default ""; String name(); String description(); Option[] options() default {}; diff --git a/src/main/java/me/goudham/command/annotation/SubCommandGroup.java b/src/main/java/me/goudham/command/annotation/SubCommandGroup.java index be1cbed4..1097122e 100644 --- a/src/main/java/me/goudham/command/annotation/SubCommandGroup.java +++ b/src/main/java/me/goudham/command/annotation/SubCommandGroup.java @@ -1,16 +1,18 @@ package me.goudham.command.annotation; import jakarta.inject.Qualifier; +import jakarta.inject.Singleton; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Qualifier -@Target(ElementType.ANNOTATION_TYPE) +@Singleton +@Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) public @interface SubCommandGroup { + String parent(); String name(); String description(); - SubCommand[] subCommands() default {}; }