Package net.dv8tion.jda.api.entities
Enum RoleConnectionMetadata.MetadataType
java.lang.Object
java.lang.Enum<RoleConnectionMetadata.MetadataType>
net.dv8tion.jda.api.entities.RoleConnectionMetadata.MetadataType
- All Implemented Interfaces:
Serializable
,Comparable<RoleConnectionMetadata.MetadataType>
- Enclosing class:
- RoleConnectionMetadata
public static enum RoleConnectionMetadata.MetadataType
extends Enum<RoleConnectionMetadata.MetadataType>
The type of metadata.
Each metadata type offers a comparison operation that allows guilds to configure role requirements based on metadata values stored by the bot. Bots specify a metadata value for each user and guilds specify the required guild's configured value within the guild role settings.
Each metadata type offers a comparison operation that allows guilds to configure role requirements based on metadata values stored by the bot. Bots specify a metadata value for each user and guilds specify the required guild's configured value within the guild role settings.
For example, you could use INTEGER_GREATER_THAN_OR_EQUAL
on a connection to require a certain metadata value to be at least the desired minimum value.
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionfromValue
(int value) The MetadataType for the provided raw value.int
getValue()
The raw value used by Discord.Returns the enum constant of this type with the specified name.static RoleConnectionMetadata.MetadataType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
INTEGER_LESS_THAN_OR_EQUAL
-
INTEGER_GREATER_THAN_OR_EQUAL
-
INTEGER_EQUALS
-
INTEGER_NOT_EQUALS
-
DATETIME_LESS_THAN_OR_EQUAL
-
DATETIME_GREATER_THAN_OR_EQUAL
-
BOOLEAN_EQUAL
-
BOOLEAN_NOT_EQUAL
-
UNKNOWN
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getValue
public int getValue()The raw value used by Discord.- Returns:
- The raw value
-
fromValue
The MetadataType for the provided raw value.- Parameters:
value
- The raw value- Returns:
- The MetadataType for the provided raw value, or
UNKNOWN
if none is found
-