Class UnknownChannel

java.lang.Object
discord4j.core.object.entity.channel.UnknownChannel
All Implemented Interfaces:
DiscordObject, Channel, Entity

public class UnknownChannel extends Object
A Channel implementation representing an unsupported or not implemented channel type. Use Channel.getData() to retrieve entity information and Channel.getRestChannel() to obtain an instance to perform REST API operations on this channel.
  • Constructor Details

    • UnknownChannel

      public UnknownChannel(GatewayDiscordClient gateway, discord4j.discordjson.json.ChannelData data)
      Constructs an UnknownChannel 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

    • toString

      public String toString()
    • getClient

      public final 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.
    • getRestChannel

      public final RestChannel getRestChannel()
      Description copied from interface: Channel
      Return a RestChannel handle to execute REST API operations on this entity.
      Specified by:
      getRestChannel in interface Channel
    • getData

      public final discord4j.discordjson.json.ChannelData getData()
      Description copied from interface: Channel
      Gets the raw data as represented by Discord.
      Specified by:
      getData in interface Channel
      Returns:
      The raw data as represented by Discord.
    • equals

      public final boolean equals(@Nullable Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object