Interface Channel
- All Superinterfaces:
DiscordObject
,Entity
- All Known Subinterfaces:
AudioChannel
,CategorizableChannel
,GuildChannel
,GuildMessageChannel
,MessageChannel
,TopLevelGuildChannel
,TopLevelGuildMessageChannel
- All Known Implementing Classes:
Category
,ForumChannel
,NewsChannel
,PrivateChannel
,StageChannel
,StoreChannel
,TextChannel
,ThreadChannel
,UnknownChannel
,VoiceChannel
A Discord channel.
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Represent channel flags : https://discord.com/developers/docs/resources/channel#channel-object-channel-flagsstatic enum
Represents the various types of channels. -
Method Summary
Modifier and TypeMethodDescriptiondelete()
Requests to delete this channel.Requests to delete this channel while optionally specifying a reason.discord4j.discordjson.json.ChannelData
getData()
Gets the raw data as represented by Discord.default Snowflake
getId()
Gets the Snowflake that uniquely identifies this entity.default String
Gets the raw mention.Return aRestChannel
handle to execute REST API operations on this entity.default Channel.Type
getType()
Gets the type of channel.Methods inherited from interface discord4j.core.object.DiscordObject
getClient
-
Method Details
-
getType
Gets the type of channel.- Returns:
- The type of channel.
-
getId
Description copied from interface:Entity
Gets the Snowflake that uniquely identifies this entity. -
delete
Requests to delete this channel.- Returns:
- A
Mono
where, upon successful completion, emits nothing; indicating the channel has been deleted. If an error is received, it is emitted through theMono
.
-
delete
Requests to delete this channel while optionally specifying a reason.- Parameters:
reason
- The reason, if present.- Returns:
- A
Mono
where, upon successful completion, emits nothing; indicating the channel has been deleted. If an error is received, it is emitted through theMono
.
-
getMention
Gets the raw mention. This is the format utilized to directly mention another channel.- Returns:
- The raw mention.
-
getRestChannel
RestChannel getRestChannel()Return aRestChannel
handle to execute REST API operations on this entity. -
getData
discord4j.discordjson.json.ChannelData getData()Gets the raw data as represented by Discord.- Returns:
- The raw data as represented by Discord.
-