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 GatewayDiscordClientgetClient()Returns theGatewayDiscordClientthat created this object.discord4j.discordjson.json.FollowedChannelDatagetData()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.SnowflakegetNewsChannelId()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.SnowflakegetWebhookId()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:DiscordObjectReturns theGatewayDiscordClientthat created this object. Methods in it are exclusively based on the entity cache orStorein use. Refer to callinggetClient().rest()to access aDiscordClientthat is capable of requesting entities directly from the REST API.- Specified by:
getClientin interfaceDiscordObject- Returns:
- The
GatewayDiscordClientassociated 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
Monowhere, upon successful completion, emits thenews channelthat 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
Monowhere, upon successful completion, emits thenews channelthat 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
-
-