Class InteractionImpl
java.lang.Object
net.dv8tion.jda.internal.interactions.InteractionImpl
- All Implemented Interfaces:
ISnowflake
,Interaction
- Direct Known Subclasses:
CommandAutoCompleteInteractionImpl
,CommandInteractionPayloadImpl
,DeferrableInteractionImpl
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
ack()
The channel this interaction happened in.long
The ID of the channel this interaction happened in.Gets the context in which this command was executed.Returns the list ofentitlements
for the current guild and user.getGuild()
TheGuild
this interaction happened in.long
The Snowflake id of this entity.Returns the integration owners of this interaction, which depends on how the app was installed.getJDA()
Returns theJDA
instance of this interactionTheMember
who caused this interaction.getToken()
The interaction token used for responding to an interaction.int
The raw interaction type.getUser()
TheUser
who caused this interaction.Returns the selected language of the invoking user.boolean
Whether this interaction has already been acknowledged.void
releaseHook
(boolean success) Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.dv8tion.jda.api.interactions.Interaction
getChannelId, getChannelType, getGuildChannel, getGuildLocale, getMessageChannel, getType, isFromAttachedGuild, isFromGuild
Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getTimeCreated
-
Constructor Details
-
InteractionImpl
-
-
Method Details
-
releaseHook
public void releaseHook(boolean success) -
ack
public boolean ack() -
isAcknowledged
public boolean isAcknowledged()Description copied from interface:Interaction
Whether this interaction has already been acknowledged.
Each interaction can only be acknowledged once.- Specified by:
isAcknowledged
in interfaceInteraction
- Returns:
- True, if this interaction has already been acknowledged
-
getIdLong
public long getIdLong()Description copied from interface:ISnowflake
The Snowflake id of this entity. This is unique to every entity and will never change.- Specified by:
getIdLong
in interfaceISnowflake
- Returns:
- Long containing the Id.
-
getTypeRaw
public int getTypeRaw()Description copied from interface:Interaction
The raw interaction type.
It is recommended to useInteraction.getType()
instead.- Specified by:
getTypeRaw
in interfaceInteraction
- Returns:
- The raw interaction type
-
getToken
Description copied from interface:Interaction
The interaction token used for responding to an interaction.- Specified by:
getToken
in interfaceInteraction
- Returns:
- The interaction token
-
getGuild
Description copied from interface:Interaction
TheGuild
this interaction happened in.
This is null in direct messages.- Specified by:
getGuild
in interfaceInteraction
- Returns:
- The
Guild
or null
-
getChannel
Description copied from interface:Interaction
The channel this interaction happened in.- Specified by:
getChannel
in interfaceInteraction
- Returns:
- The channel or null if the channel is not provided
-
getChannelIdLong
public long getChannelIdLong()Description copied from interface:Interaction
The ID of the channel this interaction happened in.
This might be 0 if no channel context is provided in future interaction types.- Specified by:
getChannelIdLong
in interfaceInteraction
- Returns:
- The channel ID, or 0 if no channel context is provided
-
getUserLocale
Description copied from interface:Interaction
Returns the selected language of the invoking user.- Specified by:
getUserLocale
in interfaceInteraction
- Returns:
- The language of the invoking user
-
getContext
Description copied from interface:Interaction
Gets the context in which this command was executed.- Specified by:
getContext
in interfaceInteraction
- Returns:
- The context in which this command was executed
-
getIntegrationOwners
Description copied from interface:Interaction
Returns the integration owners of this interaction, which depends on how the app was installed.- Specified by:
getIntegrationOwners
in interfaceInteraction
- Returns:
- The integration owners of this interaction
-
getUser
Description copied from interface:Interaction
TheUser
who caused this interaction.- Specified by:
getUser
in interfaceInteraction
- Returns:
- The
User
-
getMember
Description copied from interface:Interaction
TheMember
who caused this interaction.
This is null if the interaction is not from a guild.- Specified by:
getMember
in interfaceInteraction
- Returns:
- The
Member
-
getEntitlements
Description copied from interface:Interaction
Returns the list ofentitlements
for the current guild and user.
If this interaction is not from a guild, it will only contain entitlements of the user.- Specified by:
getEntitlements
in interfaceInteraction
- Returns:
- The
List
ofEntitlement
-
getJDA
Description copied from interface:Interaction
Returns theJDA
instance of this interaction- Specified by:
getJDA
in interfaceInteraction
- Returns:
- the corresponding JDA instance
-