Interface IntegrationOwners


public interface IntegrationOwners
Includes details about the authorizing user or guild for the installation(s) relevant to the interaction. For apps installed to a user, it can be used to tell the difference between the authorizing user and the user that triggered an interaction (like a message component).
See Also:
  • Method Details

    • isUserIntegration

      default boolean isUserIntegration()
      Whether this interaction was first authorized by a command with the USER_INSTALL integration type.

      You can retrieve the authorizing user with getAuthorizingUserIdLong().

      Returns:
      true if this interaction started from a user-installable command.
    • getAuthorizingUserIdLong

      long getAuthorizingUserIdLong()
      When the interaction has the USER_INSTALL integration type, returns the UserSnowflake which first authorized this interaction, or 0 otherwise.
      Returns:
      the UserSnowflake which triggered the interaction, or 0 for non-user-installable commands
    • getAuthorizingUserId

      @Nullable default String getAuthorizingUserId()
      When the interaction has the USER_INSTALL integration type, returns the UserSnowflake which first authorized this interaction, or null otherwise.
      Returns:
      the UserSnowflake which triggered the interaction, or null for non-user-installable commands
    • isGuildIntegration

      default boolean isGuildIntegration()
      Whether this interaction was first authorized by a command with the IntegrationType.GUILD_INSTALL integration type.
      This includes commands in guilds and in this app's bot DMs.

      You can retrieve the authorizing guild with Interaction.getGuild().

      Returns:
      true if this interaction started from a guild-installable command.
    • getAuthorizingGuildIdLong

      @Nullable Long getAuthorizingGuildIdLong()
      When the interaction has the GUILD_INSTALL integration type, returns the Guild ID which first authorized this interaction, or 0 if the interaction is used in the app's bot DMs, returns null otherwise.
      Returns:
      the guild ID in which the interaction is triggered in, or 0 for Bot DMs, or null for non-guild-installable commands
    • getAuthorizingGuildId

      @Nullable default String getAuthorizingGuildId()
      When the interaction has the GUILD_INSTALL integration type, returns the Guild ID which first authorized this interaction, or 0 if the interaction is used in the app's bot DMs, returns null otherwise.
      Returns:
      the guild ID in which the interaction is triggered in, or 0 for Bot DMs, or null for non-guild-installable commands