Package discord4j.core.object
Class FollowedChannel
java.lang.Object
discord4j.core.object.FollowedChannel
- All Implemented Interfaces:
DiscordObject
A news channel that has been followed.
-
Constructor Summary
ConstructorDescriptionFollowedChannel
(GatewayDiscordClient gateway, discord4j.discordjson.json.FollowedChannelData data) -
Method Summary
Modifier and TypeMethodDescriptionfinal GatewayDiscordClient
Returns theGatewayDiscordClient
that created this object.discord4j.discordjson.json.FollowedChannelData
getData()
Gets the data of the channel that has been followed.Requests to retrieve the news channel that has been followed.getNewsChannel
(EntityRetrievalStrategy retrievalStrategy) Requests to retrieve the news channel that has been followed, using the given retrieval strategy.Returns the ID of the news channel that has been followed.Requests to retrieve the webhook that has been created when following the news channel.Returns the ID of the webhook created as the result of following the news channel.
-
Constructor Details
-
FollowedChannel
public FollowedChannel(GatewayDiscordClient gateway, discord4j.discordjson.json.FollowedChannelData data)
-
-
Method Details
-
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
Returns the ID of the news channel that has been followed.- Returns:
- the news channel ID
-
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
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
Returns the ID of the webhook created as the result of following the news channel.- Returns:
- the webhook ID
-
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.
-