Enum IntegrationType

java.lang.Object
java.lang.Enum<IntegrationType>
net.dv8tion.jda.api.interactions.IntegrationType
All Implemented Interfaces:
Serializable, Comparable<IntegrationType>

public enum IntegrationType extends Enum<IntegrationType>
Represents how an app was installed, or where a command can be used.
See Also:
  • Enum Constant Details

    • UNKNOWN

      public static final IntegrationType UNKNOWN
    • GUILD_INSTALL

      public static final IntegrationType GUILD_INSTALL
      Allows commands to be added to a guild by a server manager, all users who are in the guild can access the commands and the app's DMs, assuming the app was invited with the bot scope.
    • USER_INSTALL

      public static final IntegrationType 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 the InteractionContextTypes 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 the Installation section, and select the User Install authorization method.

  • Field Details

  • Method Details

    • values

      public static IntegrationType[] 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 IntegrationType 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
    • getType

      @Nonnull public String getType()
      The raw value of this integration type.
      Returns:
      The raw value
    • fromKey

      @Nonnull public static IntegrationType fromKey(@Nonnull String key)
      Gets the integration type corresponding to the key, returns UNKNOWN if no entry matches.
      Parameters:
      key - The key to match against
      Returns:
      The integration type corresponding to the key