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 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 thebot
scope.Allows commands to be added to a user after the app has been connected to their account. -
Field Summary
Modifier and TypeFieldDescriptionstatic final Set
<IntegrationType> Contains all integration types. -
Method Summary
Modifier and TypeMethodDescriptionstatic IntegrationType
Gets the integration type corresponding to the key, returnsUNKNOWN
if no entry matches.getType()
The raw value of this integration type.static IntegrationType
Returns 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 thebot
scope. -
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 theInteractionContextTypes
set 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 theInstallation
section, and select theUser Install
authorization 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, returnsUNKNOWN
if no entry matches.- Parameters:
key
- The key to match against- Returns:
- The integration type corresponding to the key
-