[Feature] Create forum channels with default layout (#2646)

This commit is contained in:
Misha133
2023-03-31 14:15:44 +03:00
committed by GitHub
parent 83dfa0cea5
commit 0720049648
2 changed files with 5 additions and 1 deletions

View File

@@ -46,6 +46,9 @@ namespace Discord.API.Rest
[JsonProperty("default_sort_order")]
public Optional<ForumSortOrder?> DefaultSortOrder { get; set; }
[JsonProperty("default_forum_layout ")]
public Optional<ForumLayout> DefaultLayout { get; set; }
public CreateGuildChannelParams(string name, ChannelType type)
{
Name = name;

View File

@@ -400,7 +400,8 @@ namespace Discord.Rest
IsNsfw = props.IsNsfw,
Topic = props.Topic,
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);