Package net.dv8tion.jda.api.entities
Interface PrivateChannel
-
- All Superinterfaces:
Formattable,IFakeable,ISnowflake,MessageChannel
public interface PrivateChannel extends MessageChannel, IFakeable
Represents the connection used for direct messaging.- See Also:
User.openPrivateChannel()
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RestAction<Void>close()Closes a PrivateChannel.JDAgetJDA()Returns theJDAinstance of this PrivateChannelUsergetUser()TheUserthat thisPrivateChannelcommunicates with.-
Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getIdLong, getTimeCreated
-
Methods inherited from interface net.dv8tion.jda.api.entities.MessageChannel
addReactionById, addReactionById, addReactionById, addReactionById, deleteMessageById, deleteMessageById, editMessageById, editMessageById, editMessageById, editMessageById, editMessageById, editMessageById, editMessageFormatById, editMessageFormatById, formatTo, getHistory, getHistoryAfter, getHistoryAfter, getHistoryAfter, getHistoryAround, getHistoryAround, getHistoryAround, getHistoryBefore, getHistoryBefore, getHistoryBefore, getHistoryFromBeginning, getIterableHistory, getLatestMessageId, getLatestMessageIdLong, getName, getType, hasLatestMessage, pinMessageById, pinMessageById, purgeMessages, purgeMessages, purgeMessagesById, purgeMessagesById, purgeMessagesById, removeReactionById, removeReactionById, removeReactionById, removeReactionById, retrieveMessageById, retrieveMessageById, retrievePinnedMessages, retrieveReactionUsersById, retrieveReactionUsersById, retrieveReactionUsersById, retrieveReactionUsersById, sendFile, sendFile, sendFile, sendFile, sendMessage, sendMessage, sendMessage, sendMessageFormat, sendTyping, unpinMessageById, unpinMessageById
-
-
-
-
Method Detail
-
getUser
@Nonnull User getUser()
TheUserthat thisPrivateChannelcommunicates with.- Returns:
- A non-null
User.
-
getJDA
@Nonnull JDA getJDA()
Returns theJDAinstance of this PrivateChannel- Specified by:
getJDAin interfaceMessageChannel- Returns:
- the corresponding JDA instance
-
close
@Nonnull @CheckReturnValue RestAction<Void> close()
Closes a PrivateChannel. After being closed successfully the PrivateChannel is removed from the JDA mapping.
As a note, this does not remove the history of the PrivateChannel. If the channel is reopened the history will still be present.- Returns:
RestAction- Type: Void
-
-