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

public interface Channel extends Entity
A Discord channel.
See Also:
  • Method Details

    • getType

      default Channel.Type getType()
      Gets the type of channel.
      Returns:
      The type of channel.
    • getId

      default Snowflake getId()
      Description copied from interface: Entity
      Gets the Snowflake that uniquely identifies this entity.
      Specified by:
      getId in interface Entity
      Returns:
      The Snowflake that uniquely identifies this entity.
    • delete

      default Mono<Void> 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 the Mono.
    • delete

      default Mono<Void> delete(@Nullable String reason)
      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 the Mono.
    • 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 a RestChannel 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.