From ae645d626997e4a0e90ce10dc4e4dec915b9994e Mon Sep 17 00:00:00 2001 From: v3Monsta Date: Wed, 16 Aug 2017 10:05:17 -0400 Subject: [PATCH] Expose IsNsfw prop directly in ITextChannel --- src/Discord.Net.Core/Entities/Channels/IChannel.cs | 4 +++- src/Discord.Net.Core/Entities/Channels/ITextChannel.cs | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Discord.Net.Core/Entities/Channels/IChannel.cs b/src/Discord.Net.Core/Entities/Channels/IChannel.cs index fbb979951..9471857eb 100644 --- a/src/Discord.Net.Core/Entities/Channels/IChannel.cs +++ b/src/Discord.Net.Core/Entities/Channels/IChannel.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using System.Threading.Tasks; namespace Discord @@ -8,6 +9,7 @@ namespace Discord /// Gets the name of this channel. string Name { get; } + [Obsolete("Deprecated, please use ITextChannel#IsNsfw instead")] /// Checks if the channel is NSFW. bool IsNsfw { get; } diff --git a/src/Discord.Net.Core/Entities/Channels/ITextChannel.cs b/src/Discord.Net.Core/Entities/Channels/ITextChannel.cs index 038faf6bc..0e67ebe80 100644 --- a/src/Discord.Net.Core/Entities/Channels/ITextChannel.cs +++ b/src/Discord.Net.Core/Entities/Channels/ITextChannel.cs @@ -8,6 +8,9 @@ namespace Discord /// Gets the current topic for this text channel. string Topic { get; } + /// Checks if the channel is NSFW. + new bool IsNsfw { get; } + /// Modifies this text channel. Task ModifyAsync(Action func, RequestOptions options = null); }