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 aResolvedChannelwith an associatedGatewayDiscordClientand Discord data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Mono<Channel>asFullChannel()Retrieves the fullChannelinstance corresponding to this resolved channel.Mono<Channel>asFullChannel(EntityRetrievalStrategy retrievalStrategy)Retrieves the fullChannelinstance corresponding to this resolved channel, using the given retrieval strategy.GatewayDiscordClientgetClient()Returns theGatewayDiscordClientthat created this object.discord4j.discordjson.json.ResolvedChannelDatagetData()Returns the raw data as represented by Discord.PermissionSetgetEffectivePermissions()Gets the computed permissions for the invoking user in the channel, including overwrites.SnowflakegetId()Gets the id of the channel.StringgetName()Gets the name of the channel.Channel.TypegetType()Gets the type of the channel.StringtoString()
-
-
-
Constructor Detail
-
ResolvedChannel
public ResolvedChannel(GatewayDiscordClient gateway, discord4j.discordjson.json.ResolvedChannelData data)
Constructs aResolvedChannelwith an associatedGatewayDiscordClientand Discord data.- Parameters:
gateway- TheGatewayDiscordClientassociated 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 fullChannelinstance corresponding to this resolved channel.
-
asFullChannel
public Mono<Channel> asFullChannel(EntityRetrievalStrategy retrievalStrategy)
Retrieves the fullChannelinstance corresponding to this resolved channel, using the given retrieval strategy.
-
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.
-
-