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.
See Also:
  • Constructor Details

    • ResolvedChannel

      public ResolvedChannel(GatewayDiscordClient gateway, discord4j.discordjson.json.ResolvedChannelData data)
      Constructs a ResolvedChannel with an associated GatewayDiscordClient and Discord data.
      Parameters:
      gateway - The GatewayDiscordClient associated to this object, must be non-null.
      data - The raw data as represented by Discord, must be non-null.
  • Method Details

    • 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 full Channel instance corresponding to this resolved channel.
      Returns:
      a Mono where, upon successful completion, emits the full Channel instance corresponding to this resolved channel. If an error is received, it is emitted through the Mono.
    • asFullChannel

      public Mono<Channel> asFullChannel(EntityRetrievalStrategy retrievalStrategy)
      Retrieves the full Channel instance corresponding to this resolved channel, using the given retrieval strategy.
      Returns:
      a Mono where, upon successful completion, emits the full Channel instance corresponding to this resolved channel. If an error is received, it is emitted through the Mono.
    • 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.
    • toString

      public String toString()
      Overrides:
      toString in class Object