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

Conversation

danielmejido
Copy link
Contributor

Add 'default_forum_layout' field to Channel object api docs

@Lulalaby
Copy link
Contributor

Duplicate of #5693

docs/Change_Log.md Outdated Show resolved Hide resolved
docs/resources/Channel.md Outdated Show resolved Hide resolved
Copy link
Contributor

@shaydewael shaydewael left a comment

Choose a reason for hiding this comment

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

Some small suggestions that you can take or leave—the only thing that really needs to be changed is description for GALLERY_VIEW.


| 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

docs/Change_Log.md Outdated Show resolved Hide resolved
docs/resources/Channel.md Outdated Show resolved Hide resolved
docs/resources/Channel.md Outdated Show resolved Hide resolved
danielmejido and others added 5 commits December 13, 2022 14:12
Co-authored-by: shay <swdewael@gmail.com>
Co-authored-by: shay <swdewael@gmail.com>
Co-authored-by: shay <swdewael@gmail.com>
@@ -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 |
Copy link
Contributor

Choose a reason for hiding this comment

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

When is this null? I thought when it's unset it is 0 and not null

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I duped the row above, it's not null, you're correct that it's 0 when a value isn't set. Updated

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

Choose a reason for hiding this comment

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

What happens when you set this to null here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's not nullable- nice catch, updated

@MinnDevelopment
Copy link
Contributor

GitHub doesn't let me approve review, but since you requested it.

LGTM 👍🏼

@ooliver1
Copy link

ooliver1 commented Feb 12, 2023

Is it not possible to set this on creation with POST /guilds/{guild.id}/channels?

@Tin
Copy link
Contributor

Tin commented Feb 13, 2023

@ooliver1 Thanks for the report. It's a bug. A fix is coming soon.

@ooliver1
Copy link

@Tin A fix? It is not documented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants