Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add API Docs for 'default_forum_layout' channel data attribute #5745

Merged
merged 7 commits into from
Dec 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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`.

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 |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if it has no default value, how does it display for users by default? list view still?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, on the UI it shows as "List" when it's NOT_SET. Because "List" is the current default value.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessary, but it could be helpful to include that posts will display as list in this scenario as well

| 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