[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:
@@ -4,6 +4,7 @@ using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Model = Discord.API.Channel;
|
||||
|
||||
namespace Discord.Rest
|
||||
@@ -15,7 +16,7 @@ namespace Discord.Rest
|
||||
public class RestNewsChannel : RestTextChannel, INewsChannel
|
||||
{
|
||||
internal RestNewsChannel(BaseDiscordClient discord, IGuild guild, ulong id)
|
||||
:base(discord, guild, id)
|
||||
: base(discord, guild, id)
|
||||
{
|
||||
}
|
||||
internal new static RestNewsChannel Create(BaseDiscordClient discord, IGuild guild, Model model)
|
||||
@@ -25,5 +26,9 @@ namespace Discord.Rest
|
||||
return entity;
|
||||
}
|
||||
public override int SlowModeInterval => throw new NotSupportedException("News channels do not support Slow Mode.");
|
||||
|
||||
/// <inheritdoc />
|
||||
public Task<ulong> FollowAnnouncementChannelAsync(ulong channelId, RequestOptions options = null)
|
||||
=> ChannelHelper.FollowAnnouncementChannelAsync(this, channelId, Discord, options);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user