Skip to content

Commit

Permalink
[Feature] Create forum channels with default layout (#2646)
Browse files Browse the repository at this point in the history
  • Loading branch information
Misha-133 committed Mar 31, 2023
1 parent 83dfa0c commit 0720049
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/Discord.Net.Rest/API/Rest/CreateGuildChannelParams.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ internal class CreateGuildChannelParams
[JsonProperty("default_sort_order")]
public Optional<ForumSortOrder?> DefaultSortOrder { get; set; }

[JsonProperty("default_forum_layout ")]

This comment has been minimized.

Copy link
@gehongyan

gehongyan May 20, 2023

Contributor

Maybe unexpected trailing whitespace.

public Optional<ForumLayout> DefaultLayout { get; set; }

public CreateGuildChannelParams(string name, ChannelType type)
{
Name = name;
Expand Down
3 changes: 2 additions & 1 deletion src/Discord.Net.Rest/Entities/Guilds/GuildHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,8 @@ public static async Task<RestForumChannel> CreateForumChannelAsync(IGuild guild,
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);
Expand Down

0 comments on commit 0720049

Please sign in to comment.