Method FollowAsync
- Namespace
- DisCatSharp.Entities
- Assembly
- DisCatSharp.dll
FollowAsync(DiscordChannel, CancellationToken)
Follows a news channel.
public Task<DiscordFollowedChannel> FollowAsync(DiscordChannel targetChannel, CancellationToken cancellationToken = default)
Parameters
targetChannelDiscordChannelChannel to crosspost messages to.
cancellationTokenCancellationTokenA token to cancel the request.
Returns
Exceptions
- ArgumentException
Thrown when trying to follow a non-news channel.
- UnauthorizedException
Thrown when the current user doesn't have ManageWebhooks on the target channel.