Class ApplicationCommandInteractionResolved

java.lang.Object
discord4j.core.object.command.ApplicationCommandInteractionResolved
All Implemented Interfaces:
DiscordObject

@Experimental public class ApplicationCommandInteractionResolved extends Object implements DiscordObject
An object containing resolved objects from a Discord application command interaction.
See Also:
  • Constructor Details

    • ApplicationCommandInteractionResolved

      public ApplicationCommandInteractionResolved(GatewayDiscordClient gateway, discord4j.discordjson.json.ApplicationCommandInteractionResolvedData data, @Nullable Long guildId)
  • Method Details

    • getClient

      public GatewayDiscordClient getClient()
      Description copied from interface: DiscordObject
      Returns the GatewayDiscordClient that created this object. Methods in it are exclusively based on the entity cache or Store in use. Refer to calling getClient().rest() to access a DiscordClient that is capable of requesting entities directly from the REST API.
      Specified by:
      getClient in interface DiscordObject
      Returns:
      The GatewayDiscordClient associated to this object.
    • getData

      public discord4j.discordjson.json.ApplicationCommandInteractionResolvedData getData()
      Gets the raw data as represented by Discord.
      Returns:
      The raw data as represented by Discord.
    • getChannel

      public Optional<ResolvedChannel> getChannel(Snowflake channelId)
      Gets the resolved channel with the given ID, if present.
      Parameters:
      channelId - the ID of the channel to get
      Returns:
      the resolved channel, if present
    • getChannels

      public Map<Snowflake,ResolvedChannel> getChannels()
      Gets a map containing the resolved channels associated by their IDs
      Returns:
      the resolved channels
    • getUser

      public Optional<User> getUser(Snowflake userId)
      Gets the resolved user with the given ID, if present.
      Parameters:
      userId - the ID of the user to get
      Returns:
      the resolved user, if present
    • getUsers

      public Map<Snowflake,User> getUsers()
      Gets a map containing the resolved users associated by their IDs
      Returns:
      the resolved users
    • getMember

      public Optional<ResolvedMember> getMember(Snowflake memberId)
      Gets the resolved member with the given ID, if present.
      Parameters:
      memberId - the ID of the member to get
      Returns:
      the resolved member, if present
    • getMembers

      public Map<Snowflake,ResolvedMember> getMembers()
      Gets a map containing the resolved members associated by their IDs
      Returns:
      the resolved members
    • getRole

      public Optional<Role> getRole(Snowflake roleId)
      Gets the resolved role with the given ID, if present.
      Parameters:
      roleId - the ID of the role to get
      Returns:
      the resolved role, if present
    • getRoles

      public Map<Snowflake,Role> getRoles()
      Gets a map containing the resolved roles associated by their IDs
      Returns:
      the resolved roles
    • getMessage

      public Optional<Message> getMessage(Snowflake messageId)
      Gets the resolved message with the given ID, if present.
      Parameters:
      messageId - the ID of the message to get
      Returns:
      the resolved message, if present
    • getMessages

      public Map<Snowflake,Message> getMessages()
      Gets a map containing the resolved messages associated by their IDs
      Returns:
      the resolved messages
    • getAttachment

      public Optional<Attachment> getAttachment(Snowflake attachmentId)
      Gets the resolved attachment with the given ID, if present.
      Parameters:
      attachmentId - the ID of the attachment to get
      Returns:
      the resolved attachment, if present
    • getAttachments

      public Map<Snowflake,Attachment> getAttachments()
      Gets a map containing the resolved attachments associated by their IDs
      Returns:
      the resolved attachments
    • toString

      public String toString()
      Overrides:
      toString in class Object