Skip to content

Commit

Permalink
Add API Docs for 'default_forum_layout' channel data attribute (#5745)
Browse files Browse the repository at this point in the history
* add docs for default forum layout field in channel data

* Update docs/Change_Log.md

Co-authored-by: shay <swdewael@gmail.com>

* Update docs/resources/Channel.md

Co-authored-by: shay <swdewael@gmail.com>

* Update docs/resources/Channel.md

Co-authored-by: shay <swdewael@gmail.com>

* fix tabs for table

* remove mention of threads

* int is not nullable

Co-authored-by: Daniel Mejido <daniel.mejido@M1P-DMejido.local>
Co-authored-by: shay <swdewael@gmail.com>
  • Loading branch information
3 people committed Dec 13, 2022
1 parent cf06a70 commit 6be7fe2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/Change_Log.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Change Log

## Add Default Layout setting for Forum channels

#### Dec 13, 2022

`default_forum_layout` is an optional field in the [channel object](#DOCS_RESOURCES_CHANNEL) that indicates the default layout for posts in a [forum channel](#DOCS_TOPICS_THREADS/forums). A value of 1 (`LIST_VIEW`) indicates that posts will be displayed as a chronological list, and 2 (`GALLERY_VIEW`) indicates they will be displayed as a collection of tiles. If `default_forum_layout` hasn't been set, the value will be `0`.

This comment has been minimized.

Copy link
@ooliver1

ooliver1 Dec 13, 2022

If default_forum_layout hasn't been set, the value will be 0.

Then why is it ommitable at the same time?


Setting `default_forum_layout` requires the `MANAGE_CHANNELS` permission.

## Add Auto Moderation Allow List for Keyword Rules and Increase Max Keyword Rules Per Guild Limit

#### Nov 22, 2022
Expand Down
10 changes: 10 additions & 0 deletions docs/resources/Channel.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Represents a guild or DM channel within Discord.
| default_reaction_emoji? | ?[default reaction](#DOCS_RESOURCES_CHANNEL/default-reaction-object) object | the emoji to show in the add reaction button on a thread in a `GUILD_FORUM` channel |
| default_thread_rate_limit_per_user? | integer | the initial `rate_limit_per_user` to set on newly created threads in a channel. this field is copied to the thread at creation time and does not live update. |
| default_sort_order? | ?integer | the [default sort order type](#DOCS_RESOURCES_CHANNEL/channel-object-sort-order-types) used to order posts in `GUILD_FORUM` channels. Defaults to `null`, which indicates a preferred sort order hasn't been set by a channel admin |
| default_forum_layout? | integer | the [default forum layout view](#DOCS_RESOURCES_CHANNEL/channel-object-forum-layout-types) used to display posts in `GUILD_FORUM` channels. Defaults to `0`, which indicates a layout view has not been set by a channel admin |

\* `rate_limit_per_user` also applies to thread creation. Users can send one message and create one thread during each `rate_limit_per_user` interval.
\*\* For threads created before July 1, 2022, the message count is inaccurate when it's greater than 50.
Expand Down Expand Up @@ -86,6 +87,14 @@ Represents a guild or DM channel within Discord.
| LATEST_ACTIVITY | 0 | Sort forum posts by activity |
| CREATION_DATE | 1 | Sort forum posts by creation time (from most recent to oldest) |

###### Forum Layout Types

| Flag | Value | Description |
| --------------- | ----- | -------------------------------------------------------------- |
| NOT_SET | 0 | No default has been set for forum channel |
| LIST_VIEW | 1 | Display posts as a list |
| GALLERY_VIEW | 2 | Display posts as a collection of tiles |

###### Example Guild Text Channel

```json
Expand Down Expand Up @@ -874,6 +883,7 @@ Requires the `MANAGE_CHANNELS` permission for the guild. Fires a [Channel Update
| default_reaction_emoji? | ?[default reaction](#DOCS_RESOURCES_CHANNEL/default-reaction-object) object | the emoji to show in the add reaction button on a thread in a `GUILD_FORUM` channel | Forum |
| default_thread_rate_limit_per_user? | integer | the initial `rate_limit_per_user` to set on newly created threads in a channel. this field is copied to the thread at creation time and does not live update. | Text, Forum |
| default_sort_order? | ?integer | the [default sort order type](#DOCS_RESOURCES_CHANNEL/channel-object-sort-order-types) used to order posts in `GUILD_FORUM` channels | Forum |
| default_forum_layout? | integer | the [default forum layout type](#DOCS_RESOURCES_CHANNEL/channel-object-forum-layout-types) used to display posts in `GUILD_FORUM` channels | Forum |

\* For voice channels, normal servers can set bitrate up to 96000, servers with Boost level 1 can set up to 128000, servers with Boost level 2 can set up to 256000, and servers with Boost level 3 or the `VIP_REGIONS` [guild feature](#DOCS_RESOURCES_GUILD/guild-object-guild-features) can set up to 384000. For stage channels, bitrate can be set up to 64000.

Expand Down

0 comments on commit 6be7fe2

Please sign in to comment.