Class FollowedChannel

java.lang.Object
discord4j.core.object.FollowedChannel
All Implemented Interfaces:
DiscordObject

public class FollowedChannel extends Object implements DiscordObject
A news channel that has been followed.
  • Constructor Details

    • FollowedChannel

      public FollowedChannel(GatewayDiscordClient gateway, discord4j.discordjson.json.FollowedChannelData data)
  • Method Details

    • getClient

      public final GatewayDiscordClient getClient()
      Description copied from interface: DiscordObject
      Returns the GatewayDiscordClient that created this object. Methods in it are exclusively based on the entity cache or Store in use. Refer to calling getClient().rest() to access a DiscordClient that is capable of requesting entities directly from the REST API.
      Specified by:
      getClient in interface DiscordObject
      Returns:
      The GatewayDiscordClient associated to this object.
    • getData

      public discord4j.discordjson.json.FollowedChannelData getData()
      Gets the data of the channel that has been followed.
      Returns:
      The data of the channel that has been followed.
    • getNewsChannelId

      public Snowflake getNewsChannelId()
      Returns the ID of the news channel that has been followed.
      Returns:
      the news channel ID
    • getNewsChannel

      public Mono<NewsChannel> getNewsChannel()
      Requests to retrieve the news channel that has been followed.
      Returns:
      A Mono where, upon successful completion, emits the news channel that has been followed. If an error is received, it is emitted through the Mono.
    • getNewsChannel

      public Mono<NewsChannel> getNewsChannel(EntityRetrievalStrategy retrievalStrategy)
      Requests to retrieve the news channel that has been followed, using the given retrieval strategy.
      Parameters:
      retrievalStrategy - the strategy to use to get the news channel
      Returns:
      A Mono where, upon successful completion, emits the news channel that has been followed. If an error is received, it is emitted through the Mono.
    • getWebhookId

      public Snowflake getWebhookId()
      Returns the ID of the webhook created as the result of following the news channel.
      Returns:
      the webhook ID
    • getWebhook

      public Mono<Webhook> getWebhook()
      Requests to retrieve the webhook that has been created when following the news channel. Requires 'MANAGE_WEBHOOKS' permission.

      Note that the returned webhook cannot be executed, but can be deleted.

      Returns:
      A Mono where, upon successful completion, emits the webhook that has been created when following the news channel. If an error is received, it is emitted through the Mono.