All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.freya02.botcommands.api.commands.annotations.Optional Maven / Gradle / Ivy

package com.freya02.botcommands.api.commands.annotations;

import com.freya02.botcommands.api.commands.application.annotations.AppOption;
import com.freya02.botcommands.api.commands.prefixed.annotations.TextOption;
import org.jetbrains.annotations.Nullable;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Denotes an optional parameter annotated with {@link AppOption @AppOption} or {@link TextOption @TextOption}
 * 

You can also use the {@link Nullable @Nullable} annotation to represent an optional parameter while benefiting from static analysis * *


For regex commands: Consider this annotation as experimental, you might have errors if your command is deemed too complex, for examples having strings in wrong places */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.PARAMETER) public @interface Optional {}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy