-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Thread documentation updates #3502
Conversation
3d1c135
to
25d27dd
Compare
25d27dd
to
bbdc02a
Compare
docs/resources/Channel.md
Outdated
@@ -35,7 +35,7 @@ Represents a guild or DM channel within Discord. | |||
| default_auto_archive_duration? | integer | default duration for newly created threads, in minutes, to automatically archive the thread after recent activity, can be set to: 60, 1440, 4320, 10080 | | |||
| permissions? | string | computed permissions for the invoking user in the channel, including overwrites, only included when part of the `resolved` data received on a slash command interaction | | |||
|
|||
\* `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. | |||
\* `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 thread channels, `rate_limit_per_user` is only returned if the field is set to a non-zero and non-null value. The abscene of this field in API calls and Gateway events should indicate that slowmode has been reset to the default value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this note is for #3486 then isn't this just for creation and receiving the actual data? It was my understanding that the issue was regarding thread updates not sending the field if it had changed from non-default -> default value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that was the intention, really all I did was change our clients to channel.rateLimitPerUser = update.rateLimitPerUser ?? 0
which seemed pretty reasonable I guess?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Rapptz are you asking for the field to always be included in dispatches like thread_update?
|----------|---------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------| | ||
| threads | array of [channel](#DOCS_RESOURCES_CHANNEL/channel-object) objects | the active threads | | ||
| members | array of [thread members](#DOCS_RESOURCES_CHANNEL/thread-member-object) objects | a thread member object for each returned thread the current user has joined | | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is with
| has_more | boolean | whether there are potentially additional threads that could be returned on a subsequent call |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it was removed, it was confusing because it was always true
And we don't have an efficient way of paginating here and it's pretty cheap to just return everything since there is an active thread cap
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That means we get every thread till the cap?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the internal cap?
I'm interested. Would like to set a note in the docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I replied to this in DDevs a couple of times search for "1k" from me there. No plans to document the limit, since it's certainly possible it could change early on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oky doki.
Thanks.
Co-authored-by: Advaith <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good :3
| removed_member_ids? | array of snowflakes | the id of the users who were removed from the thread | | ||
|
||
\* In this gateway event, the thread member objects will also include the [guild member](#DOCS_RESOURCES_GUILD/guild-member-object) and [presence](#DOCS_TOPICS_GATEWAY/presence) objects for each added thread member. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The json key is "member" and "presence", right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be documented in the Thread Member structure as optional fields, as well.
See discord/discord-api-docs#3502, as well as discord/discord-api-docs#3526. The latter PR has not yet been merged, but it is preemptively required to fully support the implementations from this commit.
This commit adds support to the GET guild active threads endpoint, as per discord/discord-api-docs#3502. It also deprecates the methods for the GET channel active threads endpoint.
Closes #3494
Closes #3458
Closes #3486