Enum StageInstance.PrivacyLevel

java.lang.Object
java.lang.Enum<StageInstance.PrivacyLevel>
net.dv8tion.jda.api.entities.StageInstance.PrivacyLevel
All Implemented Interfaces:
Serializable, Comparable<StageInstance.PrivacyLevel>
Enclosing interface:
StageInstance

public static enum StageInstance.PrivacyLevel extends Enum<StageInstance.PrivacyLevel>
The privacy level for a stage instance.

This indicates from where people can join the stage instance.

  • Enum Constant Details

    • UNKNOWN

      public static final StageInstance.PrivacyLevel UNKNOWN
      Placeholder for future privacy levels, indicates that this version of JDA does not support this privacy level yet
    • PUBLIC

      Deprecated.
      Public stage instances are no longer supported by discord
      This stage instance can be accessed by lurkers, meaning users that are not active members of the guild
    • GUILD_ONLY

      public static final StageInstance.PrivacyLevel GUILD_ONLY
      This stage instance can only be accessed by guild members
  • Method Details

    • values

      public static StageInstance.PrivacyLevel[] 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

      public static StageInstance.PrivacyLevel valueOf(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:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getKey

      public int getKey()
      The raw API key for this privacy level
      Returns:
      The raw API value or -1 if this is UNKNOWN
    • fromKey

      @Nonnull public static StageInstance.PrivacyLevel fromKey(int key)
      Converts the raw API key into the respective enum value
      Parameters:
      key - The API key
      Returns:
      The enum value or UNKNOWN