package cc.fascinated.bat.command; import lombok.AccessLevel; import lombok.Getter; import lombok.NonNull; import lombok.Setter; import net.dv8tion.jda.api.Permission; /** * The internal command info of a {@link BatCommand}. * * @author Braydon */ @Setter(AccessLevel.PROTECTED) @Getter public class InternalCommandInfo { /** * The name of the command. */ @NonNull private final String name; /** * The description of the command. */ @NonNull private final String description; /** * The category of the command. */ @NonNull private Category category; /** * The permissions required to run this command, if any. */ private Permission[] permissions; /** * Whether this command can only be ran within a guild. */ private boolean guildOnly; /** * Whether this command can be user installed. */ private final boolean userInstall; /** * Whether the command can only be ran by the bot owner. */ private boolean botOwnerOnly; protected InternalCommandInfo(@NonNull CommandInfo annotation) { name = annotation.name(); description = annotation.description(); category = annotation.category(); permissions = annotation.requiredPermissions(); guildOnly = annotation.guildOnly(); userInstall = annotation.userInstall(); botOwnerOnly = annotation.botOwnerOnly(); } }