add: fromValue method to SlashCommandOptionType

This commit is contained in:
tueem 2025-02-17 19:45:18 +01:00
parent f4dbdc302d
commit caeaec1926
Signed by: tueem
GPG Key ID: 65C8667EC17A88FB

View File

@ -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;
}
}