Interface TopLevelGuildMessageChannel

All Superinterfaces:
CategorizableChannel, Channel, DiscordObject, Entity, GuildChannel, GuildMessageChannel, MessageChannel, TopLevelGuildChannel
All Known Implementing Classes:
NewsChannel, TextChannel, VoiceChannel

public interface TopLevelGuildMessageChannel extends CategorizableChannel, GuildMessageChannel
A Discord message channel in a guild that isn't a thread.
  • Method Details

    • getTopic

      default Optional<String> getTopic()
      Gets the channel topic, if present.
      Returns:
      The channel topic, if present.
    • createWebhook

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

      default discord4j.core.spec.WebhookCreateMono createWebhook(String name)
      Requests to create a webhook. Properties specifying how to create the webhook can be set via the withXxx methods of the returned WebhookCreateMono.
      Returns:
      A Mono where, upon successful completion, emits the created Webhook. If an error is received, it is emitted through the Mono.
    • createWebhook

      default Mono<Webhook> createWebhook(discord4j.core.spec.WebhookCreateSpec spec)
      Requests to create a webhook.
      Parameters:
      spec - an immutable object that specifies how to create the webhook
      Returns:
      A Mono where, upon successful completion, emits the created Webhook. If an error is received, it is emitted through the Mono.
    • getWebhooks

      default Flux<Webhook> getWebhooks()
      Requests to retrieve the webhooks of the channel.
      Returns:
      A Flux that continually emits the webhooks of the channel. If an error is received, it is emitted through the Flux.
    • startThread

      default Mono<ThreadChannel> startThread(discord4j.core.spec.StartThreadWithoutMessageSpec spec)
      Creates a new thread that is not connected to an existing message.
      Parameters:
      spec - an immutable object that specifies how to create the thread
      Returns:
      A Mono where, upon successful completion, emits the created ThreadChannel. If an error is received, it is emitted through the Mono.
    • getPublicArchivedThreads

      default Flux<ThreadListPart> getPublicArchivedThreads()
      Requests to retrieve the public archived threads for this channel.

      The audit log parts can be combined for easier querying. For example,

       
       channel.getPublicArchivedThreads()
           .take(10)
           .reduce(ThreadListPart::combine)
       
       
      Returns:
      A Flux that continually parts of this channel's thread list. If an error is received, it is emitted through the Flux.
    • getPrivateArchivedThreads

      default Flux<ThreadListPart> getPrivateArchivedThreads()
      Requests to retrieve the private archived threads for this channel.

      The thread list parts can be combined for easier querying. For example,

       
       channel.getPrivateArchivedThreads()
           .take(10)
           .reduce(ThreadListPart::combine)
       
       
      Returns:
      A Flux that continually parts of this channel's thread list. If an error is received, it is emitted through the Flux.
    • getJoinedPrivateArchivedThreads

      default Flux<ThreadListPart> getJoinedPrivateArchivedThreads()
      Requests to retrieve the joined private archived threads for this channel.

      The thread list parts can be combined for easier querying. For example,

       
       channel.getJoinedPrivateArchivedThreads()
           .take(10)
           .reduce(ThreadListPart::combine)
       
       
      Returns:
      A Flux that continually parts of this channel's thread list. If an error is received, it is emitted through the Flux.