Compare commits
No commits in common. "996f854ff738ff04d44f2c53a7e7033221ee00ac" and "caa2ee70892d3978bbbe7ec760b82b3a5532f2cd" have entirely different histories.
996f854ff7
...
caa2ee7089
@ -1,6 +0,0 @@
|
|||||||
package net.tomatentum.marinara.interaction.commands.annotation;
|
|
||||||
|
|
||||||
public @interface Range {
|
|
||||||
public double min() default Double.MIN_VALUE;
|
|
||||||
public double max() default Double.MAX_VALUE;
|
|
||||||
}
|
|
@ -15,7 +15,6 @@ public @interface SlashCommandOption {
|
|||||||
public SlashCommandOptionType type() default SlashCommandOptionType.STRING;
|
public SlashCommandOptionType type() default SlashCommandOptionType.STRING;
|
||||||
public boolean required() default false;
|
public boolean required() default false;
|
||||||
public boolean autocomplete() default false;
|
public boolean autocomplete() default false;
|
||||||
public Range range() default @Range;
|
|
||||||
public CommandChoices choices() default @CommandChoices;
|
public CommandChoices choices() default @CommandChoices;
|
||||||
|
|
||||||
public static enum PlaceHolderEnum {
|
public static enum PlaceHolderEnum {
|
||||||
|
@ -56,10 +56,6 @@ public class Discord4JConverterSpec implements CommandConverter.Spec<Application
|
|||||||
.description(option.description())
|
.description(option.description())
|
||||||
.required(option.required())
|
.required(option.required())
|
||||||
.autocomplete(option.autocomplete())
|
.autocomplete(option.autocomplete())
|
||||||
.minLength(Double.valueOf(option.range().min()).intValue())
|
|
||||||
.minValue(option.range().min())
|
|
||||||
.maxLength(Double.valueOf(option.range().max()).intValue())
|
|
||||||
.maxValue(option.range().max())
|
|
||||||
.choices(choices)
|
.choices(choices)
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
@ -51,10 +51,6 @@ public class JavacordConverterSpec implements CommandConverter.Spec<SlashCommand
|
|||||||
.setDescription(option.description())
|
.setDescription(option.description())
|
||||||
.setRequired(option.required())
|
.setRequired(option.required())
|
||||||
.setAutocompletable(option.autocomplete())
|
.setAutocompletable(option.autocomplete())
|
||||||
.setMinLength(Double.valueOf(option.range().min()).longValue())
|
|
||||||
.setDecimalMinValue(option.range().min())
|
|
||||||
.setMaxLength(Double.valueOf(option.range().max()).longValue())
|
|
||||||
.setDecimalMaxValue(option.range().max())
|
|
||||||
.setChoices(choices)
|
.setChoices(choices)
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user