Table of Contents

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

targetChannel DiscordChannel

Channel to crosspost messages to.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<DiscordFollowedChannel>

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.