Package net.dv8tion.jda.api.entities
Class Message.InteractionMetadata
java.lang.Object
net.dv8tion.jda.api.entities.Message.InteractionMetadata
- All Implemented Interfaces:
ISnowflake
- Enclosing interface:
Message
Metadata about the interaction, including the source of the interaction and relevant server and user IDs.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionInteractionMetadata
(long id, int type, User user, IntegrationOwners integrationOwners, long originalResponseMessageId, long interactedMessageId, Message.InteractionMetadata triggeringInteraction, User targetUser, long targetMessageId) -
Method Summary
Modifier and TypeMethodDescriptionlong
The Snowflake id of this entity.Returns the integration owners of this interaction, which depends on how the app was installed.The ID of the message containing the component which created this message.long
The ID of the message containing the component which created this message.The ID of the original response message, present only on followup messages.long
The ID of the original response message, present only on followup messages.The ID of the message the command was run on, present only on message interaction commands.long
The ID of the message the command was run on, present only on message interaction commands.The user the command was run on, present only on user interaction commands.Metadata for the interaction that was used to open the modal, present only on modal submit interactions.getType()
TheInteractionType
for this interaction.int
The raw interaction type.getUser()
TheUser
who caused this interaction.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getTimeCreated
-
Constructor Details
-
InteractionMetadata
public InteractionMetadata(long id, int type, User user, IntegrationOwners integrationOwners, long originalResponseMessageId, long interactedMessageId, Message.InteractionMetadata triggeringInteraction, User targetUser, long targetMessageId)
-
-
Method Details
-
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()The raw interaction type.
It is recommended to usegetType()
instead.- Returns:
- The raw interaction type
-
getType
TheInteractionType
for this interaction.- Returns:
- The
InteractionType
orInteractionType.UNKNOWN
-
getUser
TheUser
who caused this interaction.- Returns:
- The
User
-
getIntegrationOwners
Returns the integration owners of this interaction, which depends on how the app was installed.- Returns:
- The integration owners of this interaction
-
getOriginalResponseMessageIdLong
public long getOriginalResponseMessageIdLong()The ID of the original response message, present only on followup messages.- Returns:
- The ID of the original response message, or
0
-
getOriginalResponseMessageId
The ID of the original response message, present only on followup messages.- Returns:
- The ID of the original response message, or
null
-
getInteractedMessageIdLong
public long getInteractedMessageIdLong()The ID of the message containing the component which created this message.- Returns:
- the ID of the message containing the component which created this message, or
0
-
getInteractedMessageId
The ID of the message containing the component which created this message.- Returns:
- the ID of the message containing the component which created this message, or
null
-
getTriggeringInteraction
Metadata for the interaction that was used to open the modal, present only on modal submit interactions.- Returns:
- Metadata for the interaction that was used to open the modal, or
null
-
getTargetUser
The user the command was run on, present only on user interaction commands.- Returns:
- The user the command was run on, or
null
-
getTargetMessageIdLong
public long getTargetMessageIdLong()The ID of the message the command was run on, present only on message interaction commands.If this is present,
Message.getMessageReference()
will also be present.- Returns:
- The ID of the message the command was run on, or
0
-
getTargetMessageId
The ID of the message the command was run on, present only on message interaction commands.If this is present,
Message.getMessageReference()
will also be present.- Returns:
- The ID of the message the command was run on, or
null
-