Class PrivateChannel
java.lang.Object
discord4j.core.object.entity.channel.PrivateChannel
- All Implemented Interfaces:
DiscordObject
,Channel
,MessageChannel
,Entity
A Discord private channel (also known as a DM channel).
-
Nested Class Summary
Nested classes/interfaces inherited from interface discord4j.core.object.entity.channel.Channel
Channel.Flag, Channel.Type
-
Constructor Summary
ConstructorDescriptionPrivateChannel
(GatewayDiscordClient gateway, discord4j.discordjson.json.ChannelData data) Constructs anPrivateChannel
with an associatedGatewayDiscordClient
and Discord data. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
final GatewayDiscordClient
Returns theGatewayDiscordClient
that created this object.final discord4j.discordjson.json.ChannelData
getData()
Gets the raw data as represented by Discord.Gets the IDs of the recipients for this private channel.Gets the recipients for this private channel.final RestChannel
Return aRestChannel
handle to execute REST API operations on this entity.final int
hashCode()
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, delete, getData, getId, getMention, getRestChannel, getType
Methods inherited from interface discord4j.core.object.DiscordObject
getClient
Methods inherited from interface discord4j.core.object.entity.channel.MessageChannel
createEmbed, createEmbed, createMessage, createMessage, createMessage, createMessage, getLastMessage, getLastMessage, getLastMessageId, getLastPinTimestamp, getMessageById, getMessageById, getMessagesAfter, getMessagesBefore, getPinnedMessages, type, typeUntil
-
Constructor Details
-
PrivateChannel
Constructs anPrivateChannel
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 Details
-
getRecipientIds
Gets the IDs of the recipients for this private channel.- Returns:
- The IDs of the recipients for this private channel.
-
getRecipients
Gets the recipients for this private channel.- Returns:
- The recipients for this private channel.
-
toString
-
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.
-
getRestChannel
Description copied from interface:Channel
Return aRestChannel
handle to execute REST API operations on this entity.- Specified by:
getRestChannel
in interfaceChannel
-
getData
public final discord4j.discordjson.json.ChannelData getData()Description copied from interface:Channel
Gets the raw data as represented by Discord. -
equals
-
hashCode
public final int hashCode()
-