Class UnknownChannel
- java.lang.Object
-
- discord4j.core.object.entity.channel.UnknownChannel
-
- All Implemented Interfaces:
DiscordObject
,Channel
,Entity
public class UnknownChannel extends Object
AChannel
implementation representing an unsupported or not implemented channel type. UsegetData()
to retrieve entity information andChannel.getRestChannel()
to obtain an instance to perform REST API operations on this channel.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface discord4j.core.object.entity.channel.Channel
Channel.Type
-
-
Constructor Summary
Constructors Constructor Description UnknownChannel(GatewayDiscordClient gateway, discord4j.discordjson.json.ChannelData data)
Constructs anUnknownChannel
with an associatedGatewayDiscordClient
and Discord data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Mono<Void>
delete(String reason)
Requests to delete this channel while optionally specifying a reason.boolean
equals(Object obj)
GatewayDiscordClient
getClient()
Returns theGatewayDiscordClient
that created this object.Snowflake
getId()
Gets the Snowflake that uniquely identifies this entity.RestChannel
getRestChannel()
Return aRestChannel
handle to execute REST API operations on this entity.Channel.Type
getType()
Gets the type of channel.int
hashCode()
String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface discord4j.core.object.entity.channel.Channel
delete, getMention
-
-
-
-
Constructor Detail
-
UnknownChannel
public UnknownChannel(GatewayDiscordClient gateway, discord4j.discordjson.json.ChannelData data)
Constructs anUnknownChannel
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
-
toString
public String toString()
-
getClient
public final 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.
-
getId
public final Snowflake getId()
Description copied from interface:Entity
Gets the Snowflake that uniquely identifies this entity.
-
getRestChannel
public RestChannel getRestChannel()
Description copied from interface:Channel
Return aRestChannel
handle to execute REST API operations on this entity.- Specified by:
getRestChannel
in interfaceChannel
-
getType
public final Channel.Type getType()
Description copied from interface:Channel
Gets the type of channel.
-
delete
public final Mono<Void> delete(@Nullable String reason)
Description copied from interface:Channel
Requests to delete this channel while optionally specifying a reason.
-
-