+ * Using this on a User/Member will fetch the author and otherwise it'll parse the input. + *
+ */ +@Target(ElementType.PARAMETER) +@Retention(RetentionPolicy.RUNTIME) +public @interface Author { +} diff --git a/jda5/src/main/java/co/aikar/commands/annotation/CrossGuild.java b/jda5/src/main/java/co/aikar/commands/annotation/CrossGuild.java new file mode 100644 index 000000000..40b3a3b7f --- /dev/null +++ b/jda5/src/main/java/co/aikar/commands/annotation/CrossGuild.java @@ -0,0 +1,19 @@ +package co.aikar.commands.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * The {@link CrossGuild} annotation is to define whether the parameter should be guild-specific or global. + *+ * If a supported parameter is marked with the CrossGuild annotation, the parameter will be filled from + * a global perspective (i.e., all of the guilds the bot is connected to). Otherwise, the parameter will + * be filled from command input. + *
+ */ +@Target(ElementType.PARAMETER) +@Retention(RetentionPolicy.RUNTIME) +public @interface CrossGuild { +} diff --git a/jda5/src/main/java/co/aikar/commands/annotation/SelfUser.java b/jda5/src/main/java/co/aikar/commands/annotation/SelfUser.java new file mode 100644 index 000000000..2fbdc2027 --- /dev/null +++ b/jda5/src/main/java/co/aikar/commands/annotation/SelfUser.java @@ -0,0 +1,15 @@ +package co.aikar.commands.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * The {@link SelfUser} annotation is to define whether the parameter should be represented by JDA's user object + * or if it should be parsed from command input. + */ +@Target(ElementType.PARAMETER) +@Retention(RetentionPolicy.RUNTIME) +public @interface SelfUser { +} diff --git a/pom.xml b/pom.xml index 02ff79dab..1ca7464f2 100644 --- a/pom.xml +++ b/pom.xml @@ -206,6 +206,7 @@