[Feature] Follow news channels (#2590)

* initial commit

* Apply suggestions from code review

---------

Co-authored-by: Casmir <68127614+csmir@users.noreply.github.com>
This commit is contained in:
Misha133
2023-02-09 18:45:04 +03:00
committed by GitHub
parent 2ea8af1dde
commit bb056dfec0
6 changed files with 52 additions and 1 deletions

View File

@@ -590,6 +590,12 @@ namespace Discord.Rest
return models.Select(x => RestWebhook.Create(client, channel, x))
.ToImmutableArray();
}
public static async Task<ulong> FollowAnnouncementChannelAsync(INewsChannel newsChannel, ulong channelId, BaseDiscordClient client, RequestOptions options)
{
var model = await client.ApiClient.FollowChannelAsync(newsChannel.Id, channelId, options);
return model.WebhookId;
}
#endregion
#region Categories