Package net.dv8tion.jda.api.interactions
Enum IntegrationType
- All Implemented Interfaces:
Serializable,Comparable<IntegrationType>
Represents how an app was installed, or where a command can be used.
- See Also:
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAllows commands to be added to a guild by aserver manager, all users who are in the guild can access the commands and the app's DMs, assuming the app was invited with thebotscope.Allows commands to be added to a user after the app has been connected to their account. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Set<IntegrationType>Contains all integration types. -
Method Summary
Modifier and TypeMethodDescriptionstatic IntegrationTypeGets the integration type corresponding to the key, returnsUNKNOWNif no entry matches.getType()The raw value of this integration type.static IntegrationTypeReturns the enum constant of this type with the specified name.static IntegrationType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
UNKNOWN
-
GUILD_INSTALL
Allows commands to be added to a guild by aserver manager, all users who are in the guild can access the commands and the app's DMs, assuming the app was invited with thebotscope. -
USER_INSTALL
Allows commands to be added to a user after the app has been connected to their account.
Users can use the commands according to theInteractionContextTypesset on each command, and can also access the app's DMs, assuming the app has a bot.Requirements
This requires the bot to be user-installable, see on Your dashboard, in theInstallationsection, and select theUser Installauthorization method.
-
-
Field Details
-
ALL
Contains all integration types.
-
-
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
-
getType
The raw value of this integration type.- Returns:
- The raw value
-
fromKey
Gets the integration type corresponding to the key, returnsUNKNOWNif no entry matches.- Parameters:
key- The key to match against- Returns:
- The integration type corresponding to the key
-