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).
-
Method Summary
Modifier and TypeMethodDescriptiondefault StringWhen the interaction has theGUILD_INSTALLintegration type, returns theGuildID which first authorized this interaction, or0if the interaction is used in the app's bot DMs, returnsnullotherwise.When the interaction has theGUILD_INSTALLintegration type, returns theGuildID which first authorized this interaction, or0if the interaction is used in the app's bot DMs, returnsnullotherwise.default StringWhen the interaction has theUSER_INSTALLintegration type, returns theUserSnowflakewhich first authorized this interaction, ornullotherwise.longWhen the interaction has theUSER_INSTALLintegration type, returns theUserSnowflakewhich first authorized this interaction, or0otherwise.default booleanWhether this interaction was first authorized by a command with theIntegrationType.GUILD_INSTALLintegration type.default booleanWhether this interaction was first authorized by a command with theUSER_INSTALLintegration type.
-
Method Details
-
isUserIntegration
default boolean isUserIntegration()Whether this interaction was first authorized by a command with theUSER_INSTALLintegration type.You can retrieve the authorizing user with
getAuthorizingUserIdLong().- Returns:
trueif this interaction started from a user-installable command.
-
getAuthorizingUserIdLong
long getAuthorizingUserIdLong()When the interaction has theUSER_INSTALLintegration type, returns theUserSnowflakewhich first authorized this interaction, or0otherwise.- Returns:
- the
UserSnowflakewhich triggered the interaction, or0for non-user-installable commands
-
getAuthorizingUserId
When the interaction has theUSER_INSTALLintegration type, returns theUserSnowflakewhich first authorized this interaction, ornullotherwise.- Returns:
- the
UserSnowflakewhich triggered the interaction, ornullfor non-user-installable commands
-
isGuildIntegration
default boolean isGuildIntegration()Whether this interaction was first authorized by a command with theIntegrationType.GUILD_INSTALLintegration type.
This includes commands in guilds and in this app's bot DMs.You can retrieve the authorizing guild with
Interaction.getGuild().- Returns:
trueif this interaction started from a guild-installable command.
-
getAuthorizingGuildIdLong
When the interaction has theGUILD_INSTALLintegration type, returns theGuildID which first authorized this interaction, or0if the interaction is used in the app's bot DMs, returnsnullotherwise.- Returns:
- the guild ID in which the interaction is triggered in, or
0for Bot DMs, ornullfor non-guild-installable commands
-
getAuthorizingGuildId
When the interaction has theGUILD_INSTALLintegration type, returns theGuildID which first authorized this interaction, or0if the interaction is used in the app's bot DMs, returnsnullotherwise.- Returns:
- the guild ID in which the interaction is triggered in, or
0for Bot DMs, ornullfor non-guild-installable commands
-