diff --git a/lib/src/main/java/net/tomatentum/marinara/command/DiscordCommand.java b/lib/src/main/java/net/tomatentum/marinara/command/DiscordCommand.java index 0da0c02..1dab818 100644 --- a/lib/src/main/java/net/tomatentum/marinara/command/DiscordCommand.java +++ b/lib/src/main/java/net/tomatentum/marinara/command/DiscordCommand.java @@ -1,5 +1,28 @@ package net.tomatentum.marinara.command; -public class DiscordCommand { +import net.tomatentum.marinara.handler.InteractionHandler; + +public abstract class DiscordCommand implements InteractionHandler { + private String name; + private String description; + private String[] aliases; + + protected DiscordCommand(String name, String description, String... aliases) { + this.name = name; + this.description = description; + this.aliases = aliases; + } + + public String getName() { + return name; + } + public String getDescription() { + return description; + } + + public String[] getAliases() { + return aliases; + } + } diff --git a/lib/src/main/java/net/tomatentum/marinara/command/GlobalDiscordCommand.java b/lib/src/main/java/net/tomatentum/marinara/command/GlobalDiscordCommand.java new file mode 100644 index 0000000..d86cbb4 --- /dev/null +++ b/lib/src/main/java/net/tomatentum/marinara/command/GlobalDiscordCommand.java @@ -0,0 +1,17 @@ +package net.tomatentum.marinara.command; + +public class GlobalDiscordCommand extends DiscordCommand{ + private boolean enabledInDms = false; + + public GlobalDiscordCommand(String name, String description, String... aliases) { + super(name, description, aliases); + } + + public boolean isEnabledInDms() { + return enabledInDms; + } + + public void setEnabledInDms(boolean enabledInDms) { + this.enabledInDms = enabledInDms; + } +} diff --git a/lib/src/main/java/net/tomatentum/marinara/command/ServerDiscordCommand.java b/lib/src/main/java/net/tomatentum/marinara/command/ServerDiscordCommand.java new file mode 100644 index 0000000..be78c68 --- /dev/null +++ b/lib/src/main/java/net/tomatentum/marinara/command/ServerDiscordCommand.java @@ -0,0 +1,13 @@ +package net.tomatentum.marinara.command; + +public class ServerDiscordCommand extends DiscordCommand { + private long[] servers; + + public ServerDiscordCommand(String name, String description, String... aliases) { + super(name, description, aliases); + } + + public long[] getServers() { + return servers; + } +} \ No newline at end of file diff --git a/lib/src/main/java/net/tomatentum/marinara/command/annotation/CommandOption.java b/lib/src/main/java/net/tomatentum/marinara/command/annotation/CommandOption.java new file mode 100644 index 0000000..94dc890 --- /dev/null +++ b/lib/src/main/java/net/tomatentum/marinara/command/annotation/CommandOption.java @@ -0,0 +1,11 @@ +package net.tomatentum.marinara.command.annotation; + +import net.tomatentum.marinara.command.option.OptionType; + +public @interface CommandOption { + public String name(); + public String description() default ""; + public OptionType type() default OptionType.STRING; + public boolean required() default false; + +}