Browse Source

Merge eb1b04df92 into 5d7f2fc7ec

pull/794/merge
v3Monsta GitHub 8 years ago
parent
commit
0d1afb99aa
4 changed files with 11 additions and 1 deletions
  1. +3
    -1
      src/Discord.Net.Core/Entities/Channels/IChannel.cs
  2. +3
    -0
      src/Discord.Net.Core/Entities/Channels/ITextChannel.cs
  3. +2
    -0
      src/Discord.Net.Rest/Entities/Channels/RestTextChannel.cs
  4. +3
    -0
      src/Discord.Net.WebSocket/Entities/Channels/SocketTextChannel.cs

+ 3
- 1
src/Discord.Net.Core/Entities/Channels/IChannel.cs View File

@@ -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; }




+ 3
- 0
src/Discord.Net.Core/Entities/Channels/ITextChannel.cs View File

@@ -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);
} }

+ 2
- 0
src/Discord.Net.Rest/Entities/Channels/RestTextChannel.cs View File

@@ -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)
{ {


+ 3
- 0
src/Discord.Net.WebSocket/Entities/Channels/SocketTextChannel.cs View File

@@ -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


Loading…
Cancel
Save