Add IsNsfw to TextChannelProperties

This commit is contained in:
Christopher F
2017-08-29 17:42:00 -04:00
parent 608bc359ee
commit 4846264074
3 changed files with 8 additions and 1 deletions

View File

@@ -7,5 +7,9 @@
/// What the topic of the channel should be set to.
/// </summary>
public Optional<string> Topic { get; set; }
/// <summary>
/// Should this channel be flagged as NSFW?
/// </summary>
public Optional<bool> IsNsfw { get; set; }
}
}

View File

@@ -8,5 +8,7 @@ namespace Discord.API.Rest
{
[JsonProperty("topic")]
public Optional<string> Topic { get; set; }
[JsonProperty("nsfw")]
public Optional<bool> IsNsfw { get; set; }
}
}

View File

@@ -41,7 +41,8 @@ namespace Discord.Rest
{
Name = args.Name,
Position = args.Position,
Topic = args.Topic
Topic = args.Topic,
IsNsfw = args.IsNsfw
};
return await client.ApiClient.ModifyGuildChannelAsync(channel.Id, apiArgs, options).ConfigureAwait(false);
}