Reworked IChannel.IsNsfw to support the new API flag (#771)

IChannel.IsNsfw will now return false when being used on any channel
that is not an ITextChannel. When being used on an ITextChannel, this
will now account for the API flag, and fall back to the channel name.

(this is gross design, thanks discord)
This commit is contained in:
Christopher F
2017-08-28 16:45:53 -04:00
committed by GitHub
parent 361bfc1a90
commit 182f00f8ce
6 changed files with 15 additions and 4 deletions

View File

@@ -29,6 +29,8 @@ namespace Discord.API
public Optional<string> Topic { get; set; }
[JsonProperty("last_pin_timestamp")]
public Optional<DateTimeOffset?> LastPinTimestamp { get; set; }
[JsonProperty("nsfw")]
public Optional<bool> Nsfw { get; set; }
//VoiceChannel
[JsonProperty("bitrate")]