53 lines
1.3 KiB
Java
53 lines
1.3 KiB
Java
|
package moe.oko.Kiafumi.util;
|
||
|
|
||
|
import net.dv8tion.jda.api.interactions.commands.OptionType;
|
||
|
|
||
|
import java.util.HashMap;
|
||
|
|
||
|
|
||
|
public class CommandInfo {
|
||
|
private String name;
|
||
|
private String description;
|
||
|
private HashMap<String, OptionType> options;
|
||
|
private HashMap<String, String> optionDescriptions;
|
||
|
private HashMap<String, Boolean> optionRequirements;
|
||
|
|
||
|
public CommandInfo(String name, String description) {
|
||
|
this.name = name;
|
||
|
this.description = description;
|
||
|
this.options = new HashMap<>();
|
||
|
this.optionDescriptions = new HashMap<>();
|
||
|
this.optionRequirements = new HashMap<>();
|
||
|
}
|
||
|
|
||
|
public boolean hasOptions() {
|
||
|
return options != null;
|
||
|
}
|
||
|
|
||
|
public String getDescription() {
|
||
|
return description;
|
||
|
}
|
||
|
|
||
|
public String getName() {
|
||
|
return name;
|
||
|
}
|
||
|
|
||
|
public HashMap<String, OptionType> getOptions() {
|
||
|
return options;
|
||
|
}
|
||
|
|
||
|
public HashMap<String, Boolean> getOptionRequirements() {
|
||
|
return optionRequirements;
|
||
|
}
|
||
|
|
||
|
public HashMap<String, String> getOptionDescriptions() {
|
||
|
return optionDescriptions;
|
||
|
}
|
||
|
|
||
|
public void addOption(String name, String description, OptionType type, boolean required) {
|
||
|
options.put(name, type);
|
||
|
optionDescriptions.put(name, description);
|
||
|
optionRequirements.put(name, required);
|
||
|
}
|
||
|
}
|