[Feature] Create forum channels with default layout (#2646)
This commit is contained in:
@@ -46,6 +46,9 @@ namespace Discord.API.Rest
|
|||||||
[JsonProperty("default_sort_order")]
|
[JsonProperty("default_sort_order")]
|
||||||
public Optional<ForumSortOrder?> DefaultSortOrder { get; set; }
|
public Optional<ForumSortOrder?> DefaultSortOrder { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("default_forum_layout ")]
|
||||||
|
public Optional<ForumLayout> DefaultLayout { get; set; }
|
||||||
|
|
||||||
public CreateGuildChannelParams(string name, ChannelType type)
|
public CreateGuildChannelParams(string name, ChannelType type)
|
||||||
{
|
{
|
||||||
Name = name;
|
Name = name;
|
||||||
|
|||||||
@@ -400,7 +400,8 @@ namespace Discord.Rest
|
|||||||
IsNsfw = props.IsNsfw,
|
IsNsfw = props.IsNsfw,
|
||||||
Topic = props.Topic,
|
Topic = props.Topic,
|
||||||
DefaultAutoArchiveDuration = props.AutoArchiveDuration,
|
DefaultAutoArchiveDuration = props.AutoArchiveDuration,
|
||||||
DefaultSortOrder = props.DefaultSortOrder.GetValueOrDefault(ForumSortOrder.LatestActivity)
|
DefaultSortOrder = props.DefaultSortOrder.GetValueOrDefault(ForumSortOrder.LatestActivity),
|
||||||
|
DefaultLayout = props.DefaultLayout,
|
||||||
};
|
};
|
||||||
|
|
||||||
var model = await client.ApiClient.CreateGuildChannelAsync(guild.Id, args, options).ConfigureAwait(false);
|
var model = await client.ApiClient.CreateGuildChannelAsync(guild.Id, args, options).ConfigureAwait(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user