add: fromValue method to SlashCommandOptionType
This commit is contained in:
parent
f4dbdc302d
commit
caeaec1926
@ -23,4 +23,13 @@ public enum SlashCommandOptionType {
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static SlashCommandOptionType fromValue(int value) {
|
||||
for (SlashCommandOptionType type : values()) {
|
||||
if (type.getValue() == value) {
|
||||
return type;
|
||||
}
|
||||
}
|
||||
return UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user