| @@ -1,4 +1,5 @@ | |||||
| using System.Collections.Generic; | |||||
| using System; | |||||
| using System.Collections.Generic; | |||||
| using System.Threading.Tasks; | using System.Threading.Tasks; | ||||
| namespace Discord | namespace Discord | ||||
| @@ -8,6 +9,7 @@ namespace Discord | |||||
| /// <summary> Gets the name of this channel. </summary> | /// <summary> Gets the name of this channel. </summary> | ||||
| string Name { get; } | string Name { get; } | ||||
| [Obsolete("Deprecated, please use ITextChannel#IsNsfw instead")] | |||||
| /// <summary> Checks if the channel is NSFW. </summary> | /// <summary> Checks if the channel is NSFW. </summary> | ||||
| bool IsNsfw { get; } | bool IsNsfw { get; } | ||||
| @@ -8,6 +8,9 @@ namespace Discord | |||||
| /// <summary> Gets the current topic for this text channel. </summary> | /// <summary> Gets the current topic for this text channel. </summary> | ||||
| string Topic { get; } | string Topic { get; } | ||||
| /// <summary> Checks if the channel is NSFW. </summary> | |||||
| new bool IsNsfw { get; } | |||||
| /// <summary> Modifies this text channel. </summary> | /// <summary> Modifies this text channel. </summary> | ||||
| Task ModifyAsync(Action<TextChannelProperties> func, RequestOptions options = null); | Task ModifyAsync(Action<TextChannelProperties> func, RequestOptions options = null); | ||||
| } | } | ||||
| @@ -78,6 +78,8 @@ namespace Discord.Rest | |||||
| private string DebuggerDisplay => $"{Name} ({Id}, Text)"; | private string DebuggerDisplay => $"{Name} ({Id}, Text)"; | ||||
| bool ITextChannel.IsNsfw => ChannelHelper.IsNsfw(this); | |||||
| //IMessageChannel | //IMessageChannel | ||||
| async Task<IMessage> IMessageChannel.GetMessageAsync(ulong id, CacheMode mode, RequestOptions options) | async Task<IMessage> IMessageChannel.GetMessageAsync(ulong id, CacheMode mode, RequestOptions options) | ||||
| { | { | ||||
| @@ -112,6 +112,9 @@ namespace Discord.WebSocket | |||||
| } | } | ||||
| private string DebuggerDisplay => $"{Name} ({Id}, Text)"; | private string DebuggerDisplay => $"{Name} ({Id}, Text)"; | ||||
| bool ITextChannel.IsNsfw => ChannelHelper.IsNsfw(this); | |||||
| internal new SocketTextChannel Clone() => MemberwiseClone() as SocketTextChannel; | internal new SocketTextChannel Clone() => MemberwiseClone() as SocketTextChannel; | ||||
| //IGuildChannel | //IGuildChannel | ||||