Interface Channel
-
- All Superinterfaces:
DiscordObject,Entity
- All Known Subinterfaces:
CategorizableChannel,GuildChannel,GuildMessageChannel,MessageChannel,TopLevelGuildChannel,TopLevelGuildMessageChannel
- All Known Implementing Classes:
Category,NewsChannel,PrivateChannel,StoreChannel,TextChannel,VoiceChannel
public interface Channel extends Entity
A Discord channel.- See Also:
- Channel Resource
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classChannel.TypeRepresents the various types of channels.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Mono<Void>delete()Requests to delete this channel.Mono<Void>delete(String reason)Requests to delete this channel while optionally specifying a reason.default StringgetMention()Gets the raw mention.RestChannelgetRestChannel()Return aRestChannelhandle to execute REST API operations on this entity.Channel.TypegetType()Gets the type of channel.-
Methods inherited from interface discord4j.core.object.DiscordObject
getClient
-
-
-
-
Method Detail
-
getType
Channel.Type getType()
Gets the type of channel.- Returns:
- The type of channel.
-
delete
default Mono<Void> delete()
Requests to delete this channel.- Returns:
- A
Monowhere, upon successful completion, emits nothing; indicating the channel has been deleted. If an error is received, it is emitted through theMono.
-
delete
Mono<Void> delete(@Nullable String reason)
Requests to delete this channel while optionally specifying a reason.- Parameters:
reason- The reason, if present.- Returns:
- A
Monowhere, upon successful completion, emits nothing; indicating the channel has been deleted. If an error is received, it is emitted through theMono.
-
getMention
default String getMention()
Gets the raw mention. This is the format utilized to directly mention another channel.- Returns:
- The raw mention.
-
getRestChannel
RestChannel getRestChannel()
Return aRestChannelhandle to execute REST API operations on this entity.
-
-