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 TypeMethodDescriptionlongThe 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.longThe ID of the message containing the component which created this message.The ID of the original response message, present only on followup messages.longThe 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.longThe 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()TheInteractionTypefor this interaction.intThe raw interaction type.getUser()TheUserwho caused this interaction.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:ISnowflakeThe Snowflake id of this entity. This is unique to every entity and will never change.- Specified by:
getIdLongin 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
TheInteractionTypefor this interaction.- Returns:
- The
InteractionTypeorInteractionType.UNKNOWN
-
getUser
TheUserwho 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
-