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 Link icon

    • InteractionMetadata Link icon

      public InteractionMetadata(long id, int type, User user, IntegrationOwners integrationOwners, long originalResponseMessageId, long interactedMessageId, Message.InteractionMetadata triggeringInteraction, User targetUser, long targetMessageId)
  • Method Details Link icon

    • getIdLong Link icon

      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 Link icon

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

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

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

      @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 Link icon

      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 Link icon

      @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 Link icon

      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 Link icon

      @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 Link icon

      @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 Link icon

      @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 Link icon

      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 Link icon

      @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