Package net.dv8tion.jda.api.entities
Enum Invite.TargetType
- java.lang.Object
- 
- java.lang.Enum<Invite.TargetType>
- 
- net.dv8tion.jda.api.entities.Invite.TargetType
 
 
- 
- All Implemented Interfaces:
- java.io.Serializable,- java.lang.Comparable<Invite.TargetType>
 - Enclosing interface:
- Invite
 
 public static enum Invite.TargetType extends java.lang.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:
- Invite.InviteTarget.getType()
 
- 
- 
Enum Constant SummaryEnum Constants Enum Constant Description EMBEDDED_APPLICATIONThe invite points to an application in a voice channel.NONEThe invite does not have a target type,Invite.getTarget()will returnnull.STREAMThe invite points to a user's stream in a voice channel.UNKNOWNUnknown Discord invite target type.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Invite.TargetTypefromId(int id)Static accessor for retrieving a target type based on its Discord id key.intgetId()The Discord id key used to represent the target type.static Invite.TargetTypevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static Invite.TargetType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
 
- 
- 
- 
Enum Constant Detail- 
NONEpublic static final Invite.TargetType NONE The invite does not have a target type,Invite.getTarget()will returnnull.
 - 
STREAMpublic static final Invite.TargetType STREAM The invite points to a user's stream in a voice channel. The user to whose stream the invite goes can be get withInviteTarget.getUserand is notnull.- See Also:
- Invite.InviteTarget.getUser()
 
 - 
EMBEDDED_APPLICATIONpublic static final Invite.TargetType EMBEDDED_APPLICATION The invite points to an application in a voice channel. The application to which the invite goes can be get withInviteTarget.getApplicationand is notnull.- See Also:
- Invite.InviteTarget.getApplication()
 
 - 
UNKNOWNpublic static final Invite.TargetType UNKNOWN Unknown Discord invite target type. Should never happen and would only possibly happen if Discord implemented a new target type and JDA had yet to implement support for it.
 
- 
 - 
Method Detail- 
valuespublic static Invite.TargetType[] 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 (Invite.TargetType c : Invite.TargetType.values()) System.out.println(c); - Returns:
- an array containing the constants of this enum type, in the order they are declared
 
 - 
valueOfpublic static Invite.TargetType 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 name
- java.lang.NullPointerException- if the argument is null
 
 - 
getIdpublic 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, UNKNOWNis returned.
 
 
- 
 
-