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<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 IDsGatewayDiscordClient
getClient()
Returns theGatewayDiscordClient
that created this object.discord4j.discordjson.json.ApplicationCommandInteractionResolvedData
getData()
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<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 IDsString
toString()
-
-
-
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:DiscordObject
Returns theGatewayDiscordClient
that created this object. Methods in it are exclusively based on the entity cache orStore
in use. Refer to callinggetClient().rest()
to access aDiscordClient
that is capable of requesting entities directly from the REST API.- Specified by:
getClient
in interfaceDiscordObject
- 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
-
-