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

Introduce the GUILD_MEDIA channel type #6232

Merged
merged 17 commits into from
Aug 1, 2023
Merged

Conversation

insacc
Copy link
Contributor

@insacc insacc commented Jun 15, 2023

Description

  • Introduces the GUILD_MEDIA (16) channel type.

A GUILD_MEDIA is a channel that is very similar (from an API perspective) to a GUILD_FORUM channel, where only threads can be created in that channel and messages cannot be sent directly in that channel

Note: This feature is still in active development. Many aspects are subject to change


In forum channels, the first message in a thread and the channel topic can both contain markdown for bulleted lists and headings (unlike text channels).
In thread-only channels, the first message in a thread and the channel topic can both contain markdown for bulleted lists and headings (unlike text channels).
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't this outdated anyway? I believe you can use lists and heading anywhere now.

This is probably more accurate:

Suggested change
In thread-only channels, the first message in a thread and the channel topic can both contain markdown for bulleted lists and headings (unlike text channels).
In thread-only channels, the channel topic can contain markdown for bulleted lists and headings (unlike text channels).

Copy link
Contributor

Choose a reason for hiding this comment

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

yes it's anywhere usable

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We're going to update this in a new PR after this PR gets merged in, thank you for catching this 🙌

docs/resources/Channel.md Outdated Show resolved Hide resolved
@seailz seailz mentioned this pull request Jun 16, 2023
3 tasks
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 wording changes, thanks :)

docs/Change_Log.md Outdated Show resolved Hide resolved
docs/Change_Log.md Outdated Show resolved Hide resolved
docs/Change_Log.md Outdated Show resolved Hide resolved
docs/topics/Threads.md Outdated Show resolved Hide resolved
docs/topics/Threads.md Outdated Show resolved Hide resolved
docs/topics/Threads.md Outdated Show resolved Hide resolved
docs/topics/Threads.md Outdated Show resolved Hide resolved
docs/topics/Threads.md Outdated Show resolved Hide resolved
docs/topics/Threads.md Outdated Show resolved Hide resolved
docs/topics/Threads.md Outdated Show resolved Hide resolved
@onerandomusername
Copy link
Contributor

This implies support for webhooks but they are not visible to edit in the client.

docs/resources/Channel.md Outdated Show resolved Hide resolved
docs/resources/Channel.md Outdated Show resolved Hide resolved
docs/resources/Channel.md Outdated Show resolved Hide resolved
docs/resources/Channel.md Outdated Show resolved Hide resolved
docs/resources/Channel.md Outdated Show resolved Hide resolved
docs/resources/Channel.md Show resolved Hide resolved
docs/resources/Guild.md Outdated Show resolved Hide resolved
docs/resources/Guild.md Outdated Show resolved Hide resolved
DonovanDMC added a commit to OceanicJS/Oceanic that referenced this pull request Jun 22, 2023
DonovanDMC added a commit to OceanicJS/Oceanic that referenced this pull request Jun 22, 2023
@IllagerCaptain
Copy link
Contributor

My server had access to this experiment early on, so it has some pretty old media channels. This doesn't apply to any new media channels I create, but older ones appear with type GUILD_FORUM with the flags field set with the 1 << 10 bitwise operator. Additionally, webhooks are fully functional in these older ones, and appear on the client, regardless if any are created. This is not true for recently created media channels.

docs/resources/Channel.md Outdated Show resolved Hide resolved
insacc and others added 7 commits July 21, 2023 13:46
Co-authored-by: Danny <1695103+Rapptz@users.noreply.github.com>
Co-authored-by: shay <swdewael@gmail.com>
Co-authored-by: shay <swdewael@gmail.com>
Co-authored-by: shay <swdewael@gmail.com>
insacc and others added 5 commits July 21, 2023 13:46
Co-authored-by: shay <swdewael@gmail.com>
Co-authored-by: shay <swdewael@gmail.com>
Co-authored-by: shay <swdewael@gmail.com>
@insacc insacc force-pushed the task/add-guild-media-docs branch from 92cf21b to 44c9932 Compare July 21, 2023 17:47
@insacc
Copy link
Contributor Author

insacc commented Jul 21, 2023

My server had access to this experiment early on, so it has some pretty old media channels. This doesn't apply to any new media channels I create, but older ones appear with type GUILD_FORUM with the flags field set with the 1 << 10 bitwise operator. Additionally, webhooks are fully functional in these older ones, and appear on the client, regardless if any are created. This is not true for recently created media channels.

Thank you reporting this. Just to confirm, you're saying webhooks aren't working for the GUILD_MEDIA channel type, right? I'll create a ticket and investigate this.

docs/topics/Threads.md Outdated Show resolved Hide resolved
docs/topics/Threads.md Outdated Show resolved Hide resolved

### Creating Threads in Forum and Media Channels

Within thread-only channels, threads appear as posts. Threads can be created using the [`POST /channels/<channel_id>/threads`](#DOCS_RESOURCES_CHANNEL/start-thread-in-forum-channel) endpoint with [slightly different parameters](#DOCS_RESOURCES_CHANNEL/start-thread-in-forum-channel-jsonform-params) than threads in text channels. For example, when creating threads in a threads-only channel, a message is created that has the same ID as the thread which requires you to pass parameters for both a thread *and* a message.
Copy link
Contributor

@valdotle valdotle Jul 21, 2023

Choose a reason for hiding this comment

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

I think it's not ideal to use the term "thread-only channel" without really explaining that it's referring to Forum and Media Channels. This might add add unnecessary confusion, especially given that in other places this is not abbreviated in this way.
Maybe the Forum and Media channel sections could be grouped under a "thread-only channels" section to make the definition more clear.

@@ -67,6 +67,9 @@ Represents a guild or DM channel within Discord.
| GUILD_STAGE_VOICE | 13 | a voice channel for [hosting events with an audience](https://support.discord.com/hc/en-us/articles/1500005513722) |
| GUILD_DIRECTORY | 14 | the channel in a [hub](https://support.discord.com/hc/en-us/articles/4406046651927-Discord-Student-Hubs-FAQ) containing the listed servers |
| GUILD_FORUM | 15 | Channel that can only contain threads |
| GUILD_MEDIA | 16 | Channel that can only contain threads, similar to `GUILD_FORUM` channels |
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
| GUILD_MEDIA | 16 | Channel that can only contain threads, similar to `GUILD_FORUM` channels |
| GUILD_MEDIA\* | 16 | Channel that can only contain threads, similar to `GUILD_FORUM` channels |

docs/Change_Log.md Outdated Show resolved Hide resolved
@Lulalaby
Copy link
Contributor

Thank you reporting this. Just to confirm, you're saying webhooks aren't working for the GUILD_MEDIA channel type, right? I'll create a ticket and investigate this.

If I'm not mistaken, it should be already on the bug list. I remember it being mentioned in ddevs

@IllagerCaptain
Copy link
Contributor

My server had access to this experiment early on, so it has some pretty old media channels. This doesn't apply to any new media channels I create, but older ones appear with type GUILD_FORUM with the flags field set with the 1 << 10 bitwise operator. Additionally, webhooks are fully functional in these older ones, and appear on the client, regardless if any are created. This is not true for recently created media channels.

Thank you reporting this. Just to confirm, you're saying webhooks aren't working for the GUILD_MEDIA channel type, right? I'll create a ticket and investigate this.

Correct. However, after posting this, my media channels automatically converted to type 16. Attempting to create a webhook via the API returns an error.


- The `last_message_id` field is the ID of the most recently created thread in that channel. As with messages, your app will not receive a `CHANNEL_UPDATE` event when the field is changed. Instead clients should update the value when receiving [Thread Create](#DOCS_TOPICS_GATEWAY_EVENTS/thread-create) events.
- The `topic` field is what is shown in the "Guidelines" section within the Discord client.
- The `rate_limit_per_user` field limits how frequently threads can be created. There is a new `default_thread_rate_limit_per_user` field on forums as well, which limits how often messages can be sent _in a thread_. This field is copied into `rate_limit_per_user` on the thread at creation time.
- The `rate_limit_per_user` field limits how frequently threads can be created. There is a new `default_thread_rate_limit_per_user` field on thread-only channels as well, which limits how often messages can be sent _in a thread_. This field is copied into `rate_limit_per_user` on the thread at creation time.
Copy link
Contributor

Choose a reason for hiding this comment

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

The create guild channel endpoint respects default_thread_rate_limit_per_user for media channels (as well as announcement channels and forums channels). Perhaps this should be documented in the JSON parameters of this endpoint and the channel types should be noted in the channel structure.

Copy link
Contributor

Choose a reason for hiding this comment

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

insacc and others added 2 commits August 1, 2023 12:58
Co-authored-by: Valle <bluetiger.bahnfan@gmail.com>
@insacc insacc merged commit 107de2d into main Aug 1, 2023
4 checks passed
@insacc insacc deleted the task/add-guild-media-docs branch August 1, 2023 21:14

A thread can be pinned within a forum, which will be represented as the [`PINNED` flag](#DOCS_RESOURCES_CHANNEL/channel-object-channel-flags) in the `flags` field within a forum channel. A thread that is pinned will have the `(1 << 1)` flag set, and archiving that thread will unset the flag. A pinned thread will *not* auto-archive.
A thread can be pinned within a thread-only, which will be represented as the [`PINNED` flag](#DOCS_RESOURCES_CHANNEL/channel-object-channel-flags) in the `flags` field within a thread-only channel. A thread that is pinned will have the `(1 << 1)` flag set, and archiving that thread will unset the flag. A pinned thread will *not* auto-archive.
Copy link
Contributor

Choose a reason for hiding this comment

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

this should say "thread-only channel"

lukellmann added a commit to kordlib/kord that referenced this pull request Aug 3, 2023
Common functionality between ForumChannel and MediaChannel was extracted
to a new ThreadOnlyChannel supertype.

See discord/discord-api-docs#6232
lukellmann added a commit to kordlib/kord that referenced this pull request Aug 3, 2023
Common functionality between ForumChannel and MediaChannel was extracted
to a new ThreadOnlyChannel supertype.

see discord/discord-api-docs#6232
lukellmann added a commit to kordlib/kord that referenced this pull request Aug 26, 2023
Common functionality between ForumChannel and MediaChannel was extracted
to a new ThreadOnlyChannel supertype.

see discord/discord-api-docs#6232
lukellmann added a commit to kordlib/kord that referenced this pull request Sep 3, 2023
Common functionality between ForumChannel and MediaChannel was extracted
to a new ThreadOnlyChannel supertype.

see discord/discord-api-docs#6232
lukellmann added a commit to kordlib/kord that referenced this pull request Sep 3, 2023
Common functionality between ForumChannel and MediaChannel was extracted
to a new ThreadOnlyChannel supertype.

See discord/discord-api-docs#6232
lukellmann added a commit to kordlib/kord that referenced this pull request Sep 3, 2023
Common functionality between ForumChannel and MediaChannel was extracted
to a new ThreadOnlyChannel supertype.

See discord/discord-api-docs#6232
lukellmann added a commit to kordlib/kord that referenced this pull request Sep 3, 2023
Common functionality between ForumChannel and MediaChannel was extracted
to a new ThreadOnlyChannel supertype.

See discord/discord-api-docs#6232
lukellmann added a commit to kordlib/kord that referenced this pull request Sep 3, 2023
Common functionality between ForumChannel and MediaChannel was extracted
to a new ThreadOnlyChannel supertype.

See discord/discord-api-docs#6232
lukellmann added a commit to kordlib/kord that referenced this pull request Sep 3, 2023
Common functionality between ForumChannel and MediaChannel was extracted
to a new ThreadOnlyChannel supertype.

See discord/discord-api-docs#6232
Nihlus added a commit to Remora/Remora.Discord that referenced this pull request Sep 17, 2023
shaydewael added a commit to Jupith/discord-api-docs that referenced this pull request May 14, 2024
* Add docs about GUILD_MEDIA channel type

* Add more information about media channels

* Create a changelog for the `GUILD_MEDIA` channel type

* Update docs/resources/Channel.md

Co-authored-by: Danny <1695103+Rapptz@users.noreply.github.com>

* Update the change log

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

* Update the wording on the change log

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

* Update more wording on the change log

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

* Move info to the intro

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

* Remove the moved info

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

* Replace slash with `and`

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

* Update the beta state

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

* Fix more wording

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

* Address more pr comments

* Address more pr comments

* Fix broken links

* Fix typo

Co-authored-by: Valle <bluetiger.bahnfan@gmail.com>

* Address more pr comments

---------

Co-authored-by: shay <swdewael@gmail.com>
Co-authored-by: Danny <1695103+Rapptz@users.noreply.github.com>
Co-authored-by: Valle <bluetiger.bahnfan@gmail.com>
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.