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

com.freya02.botcommands.api.commands.application.slash.annotations.Length Maven / Gradle / Ivy

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

import com.freya02.botcommands.api.commands.application.annotations.AppOption;
import net.dv8tion.jda.api.interactions.commands.build.OptionData;

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

/**
 * Allows setting minimum and maximum string length on the specified {@link AppOption}.
 * 
This is only for string types ! */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.PARAMETER) public @interface Length { /** * @return The minimum value of this parameter (included) */ int min() default 1; /** * @return The maximum value of this parameter (included) */ int max() default OptionData.MAX_STRING_OPTION_LENGTH; }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy