[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

@@ -1,3 +1,4 @@
using Discord.Rest;
using System;
using System.Collections.Generic;
using System.Diagnostics;
@@ -36,5 +37,13 @@ namespace Discord.WebSocket
public override int SlowModeInterval
=> throw new NotSupportedException("News channels do not support Slow Mode.");
/// <inheritdoc cref="INewsChannel.FollowAnnouncementChannelAsync"/>
public Task<ulong> FollowAnnouncementChannelAsync(ITextChannel channel, RequestOptions options = null)
=> FollowAnnouncementChannelAsync(channel.Id, options);
/// <inheritdoc />
public Task<ulong> FollowAnnouncementChannelAsync(ulong channelId, RequestOptions options = null)
=> ChannelHelper.FollowAnnouncementChannelAsync(this, channelId, Discord, options);
}
}