Package net.dv8tion.jda.api.interactions
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 Summary
Modifier and TypeMethodDescriptiondefault String
When the interaction has theGUILD_INSTALL
integration type, returns theGuild
ID which first authorized this interaction, or0
if the interaction is used in the app's bot DMs, returnsnull
otherwise.When the interaction has theGUILD_INSTALL
integration type, returns theGuild
ID which first authorized this interaction, or0
if the interaction is used in the app's bot DMs, returnsnull
otherwise.default String
When the interaction has theUSER_INSTALL
integration type, returns theUserSnowflake
which first authorized this interaction, ornull
otherwise.long
When the interaction has theUSER_INSTALL
integration type, returns theUserSnowflake
which first authorized this interaction, or0
otherwise.default boolean
Whether this interaction was first authorized by a command with theIntegrationType.GUILD_INSTALL
integration type.default boolean
Whether this interaction was first authorized by a command with theUSER_INSTALL
integration type.
-
Method Details
-
isUserIntegration
default boolean isUserIntegration()Whether this interaction was first authorized by a command with theUSER_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 theUSER_INSTALL
integration type, returns theUserSnowflake
which first authorized this interaction, or0
otherwise.- Returns:
- the
UserSnowflake
which triggered the interaction, or0
for non-user-installable commands
-
getAuthorizingUserId
When the interaction has theUSER_INSTALL
integration type, returns theUserSnowflake
which first authorized this interaction, ornull
otherwise.- Returns:
- the
UserSnowflake
which triggered the interaction, ornull
for non-user-installable commands
-
isGuildIntegration
default boolean isGuildIntegration()Whether this interaction was first authorized by a command with theIntegrationType.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
When the interaction has theGUILD_INSTALL
integration type, returns theGuild
ID which first authorized this interaction, or0
if the interaction is used in the app's bot DMs, returnsnull
otherwise.- Returns:
- the guild ID in which the interaction is triggered in, or
0
for Bot DMs, ornull
for non-guild-installable commands
-
getAuthorizingGuildId
When the interaction has theGUILD_INSTALL
integration type, returns theGuild
ID which first authorized this interaction, or0
if the interaction is used in the app's bot DMs, returnsnull
otherwise.- Returns:
- the guild ID in which the interaction is triggered in, or
0
for Bot DMs, ornull
for non-guild-installable commands
-