Package discord4j.core.object.command
Class ResolvedChannel
- java.lang.Object
-
- discord4j.core.object.command.ResolvedChannel
-
- All Implemented Interfaces:
DiscordObject
@Experimental public class ResolvedChannel extends Object implements DiscordObject
A Discord channel that was resolved in a command.
-
-
Constructor Summary
Constructors Constructor Description ResolvedChannel(GatewayDiscordClient gateway, discord4j.discordjson.json.ResolvedChannelData data)
Constructs aResolvedChannel
with an associatedGatewayDiscordClient
and Discord data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Mono<Channel>
asFullChannel()
Retrieves the fullChannel
instance corresponding to this resolved channel.Mono<Channel>
asFullChannel(EntityRetrievalStrategy retrievalStrategy)
Retrieves the fullChannel
instance corresponding to this resolved channel, using the given retrieval strategy.GatewayDiscordClient
getClient()
Returns theGatewayDiscordClient
that created this object.discord4j.discordjson.json.ResolvedChannelData
getData()
Returns the raw data as represented by Discord.PermissionSet
getEffectivePermissions()
Gets the computed permissions for the invoking user in the channel, including overwrites.Snowflake
getId()
Gets the id of the channel.String
getName()
Gets the name of the channel.Channel.Type
getType()
Gets the type of the channel.String
toString()
-
-
-
Constructor Detail
-
ResolvedChannel
public ResolvedChannel(GatewayDiscordClient gateway, discord4j.discordjson.json.ResolvedChannelData data)
Constructs aResolvedChannel
with an associatedGatewayDiscordClient
and Discord data.- Parameters:
gateway
- TheGatewayDiscordClient
associated to this object, must be non-null.data
- The raw data as represented by Discord, must be non-null.
-
-
Method Detail
-
getData
public discord4j.discordjson.json.ResolvedChannelData getData()
Returns the raw data as represented by Discord.- Returns:
- the raw data
-
getId
public Snowflake getId()
Gets the id of the channel.- Returns:
- The id of the channel.
-
getName
public String getName()
Gets the name of the channel.- Returns:
- The name of the channel.
-
getType
public Channel.Type getType()
Gets the type of the channel.- Returns:
- The type of the channel.
-
getEffectivePermissions
public PermissionSet getEffectivePermissions()
Gets the computed permissions for the invoking user in the channel, including overwrites.- Returns:
- The permissions of the channel.
-
asFullChannel
public Mono<Channel> asFullChannel()
Retrieves the fullChannel
instance corresponding to this resolved channel.
-
asFullChannel
public Mono<Channel> asFullChannel(EntityRetrievalStrategy retrievalStrategy)
Retrieves the fullChannel
instance corresponding to this resolved channel, using the given retrieval strategy.
-
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.
-
-