Package discord4j.core.object
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 Summary
Constructors Constructor Description FollowedChannel(GatewayDiscordClient gateway, discord4j.discordjson.json.FollowedChannelData data)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GatewayDiscordClient
getClient()
Returns theGatewayDiscordClient
that created this object.discord4j.discordjson.json.FollowedChannelData
getData()
Gets the data of the channel that has been followed.Mono<NewsChannel>
getNewsChannel()
Requests to retrieve the news channel that has been followed.Mono<NewsChannel>
getNewsChannel(EntityRetrievalStrategy retrievalStrategy)
Requests to retrieve the news channel that has been followed, using the given retrieval strategy.Snowflake
getNewsChannelId()
Returns the ID of the news channel that has been followed.Mono<Webhook>
getWebhook()
Requests to retrieve the webhook that has been created when following the news channel.Snowflake
getWebhookId()
Returns the ID of the webhook created as the result of following the news channel.
-
-
-
Constructor Detail
-
FollowedChannel
public FollowedChannel(GatewayDiscordClient gateway, discord4j.discordjson.json.FollowedChannelData data)
-
-
Method Detail
-
getClient
public final GatewayDiscordClient getClient()
Description copied from interface:DiscordObject
Returns theGatewayDiscordClient
that created this object. Methods in it are exclusively based on the entity cache orStore
in use. Refer to callinggetClient().rest()
to access aDiscordClient
that is capable of requesting entities directly from the REST API.- Specified by:
getClient
in interfaceDiscordObject
- 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 thenews channel
that has been followed. If an error is received, it is emitted through theMono
.
-
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 thenews channel
that has been followed. If an error is received, it is emitted through theMono
.
-
getWebhookId
public Snowflake getWebhookId()
Returns the ID of the webhook created as the result of following the news channel.- Returns:
- the webhook ID
-
-