Interface CategorizableChannel

All Superinterfaces:
Channel, DiscordObject, Entity, GuildChannel, TopLevelGuildChannel
All Known Subinterfaces:
AudioChannel, TopLevelGuildMessageChannel
All Known Implementing Classes:
ForumChannel, NewsChannel, StageChannel, StoreChannel, TextChannel, VoiceChannel

public interface CategorizableChannel extends TopLevelGuildChannel
A Discord channel which can be categorized into a Category. These channels can also have invites.
  • Method Details

    • getRateLimitPerUser

      default int getRateLimitPerUser()
      Gets the amount of seconds a user has to wait before sending another message (0-21600).

      Bots, as well as users with the permission manage_messages or manage_channel, are unaffected.

      Returns:
      The amount of seconds a user has to wait before sending another message (0-21600).
    • getCategoryId

      default Optional<Snowflake> getCategoryId()
      Gets the ID of the category for this channel, if present.
      Returns:
      The ID of the category for this channel, if present.
    • getCategory

      default Mono<Category> getCategory()
      Requests to retrieve the category for this channel, if present.
      Returns:
      A Mono where, upon successful completion, emits the category this channel, if present. If an error is received, it is emitted through the Mono.
    • getCategory

      default Mono<Category> getCategory(EntityRetrievalStrategy retrievalStrategy)
      Requests to retrieve the category for this channel, if present, using the given retrieval strategy.
      Parameters:
      retrievalStrategy - the strategy to use to get the category
      Returns:
      A Mono where, upon successful completion, emits the category this channel, if present. If an error is received, it is emitted through the Mono.
    • createInvite

      @Deprecated default Mono<ExtendedInvite> createInvite(Consumer<? super LegacyInviteCreateSpec> spec)
      Deprecated.
      use createInvite(InviteCreateSpec) or createInvite() which offer an immutable approach to build specs
      Requests to create an invite.
      Parameters:
      spec - A Consumer that provides a "blank" LegacyInviteCreateSpec to be operated on.
      Returns:
      A Mono where, upon successful completion, emits the created ExtendedInvite. If an error is received, it is emitted through the Mono.
    • createInvite

      default discord4j.core.spec.InviteCreateMono createInvite()
      Requests to create an invite. Properties specifying how to create the invite can be set via the withXxx methods of the returned InviteCreateMono.
      Returns:
      A InviteCreateMono where, upon successful completion, emits the created ExtendedInvite. If an error is received, it is emitted through the InviteCreateMono.
    • createInvite

      default Mono<ExtendedInvite> createInvite(discord4j.core.spec.InviteCreateSpec spec)
      Requests to create an invite.
      Parameters:
      spec - an immutable object that specifies how to create the invite
      Returns:
      A Mono where, upon successful completion, emits the created ExtendedInvite. If an error is received, it is emitted through the Mono.
    • getInvites

      default Flux<ExtendedInvite> getInvites()
      Requests to retrieve this channel's invites.
      Returns:
      A Flux that continually emits this channel's invites. If an error is received, it is emitted through the Flux.