Class Message.Interaction

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

public static class Message.Interaction extends Object implements ISnowflake
Represents an Interaction provided with a Message.
  • Constructor Details

    • Interaction

      public Interaction(long id, int type, String name, User user, Member member)
  • 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
    • getName

      @Nonnull public String getName()
      The command name.
      Returns:
      The command name
    • getUser

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

      @Nullable public Member getMember()
      The Member who caused this interaction.
      This is null if the interaction is not from a guild.
      Returns:
      The Member