Package discord4j.core.object.command
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:
- Application Command Interaction Object
-
-
Constructor Summary
Constructors Constructor Description ApplicationCommandInteractionResolved(GatewayDiscordClient gateway, discord4j.discordjson.json.ApplicationCommandInteractionResolvedData data, Long guildId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<Attachment>getAttachment(Snowflake attachmentId)Gets the resolved attachment with the given ID, if present.Map<Snowflake,Attachment>getAttachments()Gets a map containing the resolved attachments associated by their IDsOptional<ResolvedChannel>getChannel(Snowflake channelId)Gets the resolved channel with the given ID, if present.Map<Snowflake,ResolvedChannel>getChannels()Gets a map containing the resolved channels associated by their IDsGatewayDiscordClientgetClient()Returns theGatewayDiscordClientthat created this object.discord4j.discordjson.json.ApplicationCommandInteractionResolvedDatagetData()Gets the raw data as represented by Discord.Optional<ResolvedMember>getMember(Snowflake memberId)Gets the resolved member with the given ID, if present.Map<Snowflake,ResolvedMember>getMembers()Gets a map containing the resolved members associated by their IDsOptional<Message>getMessage(Snowflake messageId)Gets the resolved message with the given ID, if present.Map<Snowflake,Message>getMessages()Gets a map containing the resolved messages associated by their IDsOptional<Role>getRole(Snowflake roleId)Gets the resolved role with the given ID, if present.Map<Snowflake,Role>getRoles()Gets a map containing the resolved roles associated by their IDsOptional<User>getUser(Snowflake userId)Gets the resolved user with the given ID, if present.Map<Snowflake,User>getUsers()Gets a map containing the resolved users associated by their IDsStringtoString()
-
-
-
Constructor Detail
-
ApplicationCommandInteractionResolved
public ApplicationCommandInteractionResolved(GatewayDiscordClient gateway, discord4j.discordjson.json.ApplicationCommandInteractionResolvedData data, @Nullable Long guildId)
-
-
Method Detail
-
getClient
public GatewayDiscordClient getClient()
Description copied from interface:DiscordObjectReturns theGatewayDiscordClientthat created this object. Methods in it are exclusively based on the entity cache orStorein use. Refer to callinggetClient().rest()to access aDiscordClientthat is capable of requesting entities directly from the REST API.- Specified by:
getClientin interfaceDiscordObject- Returns:
- The
GatewayDiscordClientassociated 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
-
-