Enum Invite.TargetType

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

public static enum Invite.TargetType extends Enum<Invite.TargetType>
A TargetType indicates additional action to be taken by the client on accepting the invite, typically connecting external services or launching external applications depending on the specific TargetType. Some actions might not be available or show up on certain devices.
See Also:
  • Enum Constant Details

  • Method Details

    • values

      public static Invite.TargetType[] 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 Invite.TargetType 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
    • getId

      public int getId()
      The Discord id key used to represent the target type.
      Returns:
      The id key used by discord for this channel type.
    • fromId

      @Nonnull public static Invite.TargetType fromId(int id)
      Static accessor for retrieving a target type based on its Discord id key.
      Parameters:
      id - The id key of the requested target type.
      Returns:
      The TargetType that is referred to by the provided key. If the id key is unknown, UNKNOWN is returned.