Class Message.InteractionMetadata

java.lang.Object
net.dv8tion.jda.api.entities.Message.InteractionMetadata
All Implemented Interfaces:
ISnowflake
Enclosing interface:
Message

public static class Message.InteractionMetadata extends Object implements ISnowflake
Metadata about the interaction, including the source of the interaction and relevant server and user IDs.
See Also:
  • 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 interface ISnowflake
      Returns:
      Long containing the Id.
    • getTypeRaw

      public int getTypeRaw()
      The raw interaction type.
      It is recommended to use getType() instead.
      Returns:
      The raw interaction type
    • getType

      @Nonnull public InteractionType getType()
      The InteractionType for this interaction.
      Returns:
      The InteractionType or InteractionType.UNKNOWN
    • getUser

      @Nonnull public User getUser()
      The User who caused this interaction.
      Returns:
      The User
    • getIntegrationOwners

      @Nonnull public IntegrationOwners 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

      @Nullable public String 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

      @Nullable public String 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

      @Nullable public Message.InteractionMetadata 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

      @Nullable public User 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

      @Nullable public String 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