Package net.dv8tion.jda.api.utils.cache
Enum CacheFlag
- java.lang.Object
-
- java.lang.Enum<CacheFlag>
-
- net.dv8tion.jda.api.utils.cache.CacheFlag
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ACTIVITY
Enables cache forMember.getActivities()
CLIENT_STATUS
Enables cache forMember.getOnlineStatus(ClientType)
EMOTE
Enables cache forGuild.getEmoteCache()
MEMBER_OVERRIDES
Enables cache forGuildChannel.getMemberPermissionOverrides()
ONLINE_STATUS
Enables cache forMember.getOnlineStatus()
This is enabled implicitly byACTIVITY
andCLIENT_STATUS
.ROLE_TAGS
Enables cache forRole.getTags()
VOICE_STATE
Enables cache forMember.getVoiceState()
This will always be cached for self member.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.EnumSet<CacheFlag>
getPrivileged()
Collects all cache flags that require privileged intentsGatewayIntent
getRequiredIntent()
The requiredGatewayIntent
for this cache flag.boolean
isPresence()
Whether this cache flag is for presence information of a member.static CacheFlag
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static CacheFlag[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ACTIVITY
public static final CacheFlag ACTIVITY
Enables cache forMember.getActivities()
Requires
GUILD_PRESENCES
intent to be enabled.
-
VOICE_STATE
public static final CacheFlag VOICE_STATE
Enables cache forMember.getVoiceState()
This will always be cached for self member.Requires
GUILD_VOICE_STATES
intent to be enabled.
-
EMOTE
public static final CacheFlag EMOTE
Enables cache forGuild.getEmoteCache()
Requires
GUILD_EMOJIS
intent to be enabled.
-
CLIENT_STATUS
public static final CacheFlag CLIENT_STATUS
Enables cache forMember.getOnlineStatus(ClientType)
Requires
GUILD_PRESENCES
intent to be enabled.
-
MEMBER_OVERRIDES
public static final CacheFlag MEMBER_OVERRIDES
Enables cache forGuildChannel.getMemberPermissionOverrides()
-
ROLE_TAGS
public static final CacheFlag ROLE_TAGS
Enables cache forRole.getTags()
-
ONLINE_STATUS
public static final CacheFlag ONLINE_STATUS
Enables cache forMember.getOnlineStatus()
This is enabled implicitly byACTIVITY
andCLIENT_STATUS
.Requires
GUILD_PRESENCES
intent to be enabled.- Since:
- 4.3.0
-
-
Method Detail
-
values
public static CacheFlag[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (CacheFlag c : CacheFlag.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CacheFlag valueOf(java.lang.String name)
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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getRequiredIntent
@Nullable public GatewayIntent getRequiredIntent()
The requiredGatewayIntent
for this cache flag.- Returns:
- The required intent, or null if no intents are required.
-
isPresence
public boolean isPresence()
Whether this cache flag is for presence information of a member.- Returns:
- True, if this is for presences
-
getPrivileged
@Nonnull public static java.util.EnumSet<CacheFlag> getPrivileged()
Collects all cache flags that require privileged intents- Returns:
EnumSet
of the cache flags that require the privileged intents
-
-