-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat(Threads): API v9, add rest support for Threads #31
base: beta
Are you sure you want to change the base?
Conversation
There have been a couple of changes since that PR as well, did you go through relevant doc commits after that as well? |
I took into consideration the link I put in the PR description and the discord documentation which should be updated |
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.
We're not using src
folder. Also endpoint descriptions should just be how they are named on Discord
rest/Endpoints.ts
Outdated
public static THREAD(channelID: string) { | ||
return `/channels/${channelID}/thread-members/@me`; | ||
} | ||
/** | ||
* `/channels/{channel.id}/thread-members/{user.id}` | ||
* - PUT - Adds another member to a thread | ||
* - DELETE - Removes another member from a thread | ||
*/ | ||
public static THREAD_MEMBER(channelID: string, userID: string) { | ||
return `/channels/${channelID}/thread-members/${userID}`; | ||
} |
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'm tempted to say combine these, cc @Khaaz?
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'm not sure, what did we do for other similar endpoints?
I'm not against specific /@me endpoint, although I do agree it's legitimate to combine.
rest/Endpoints.ts
Outdated
public static THREAD(channelID: string) { | ||
return `/channels/${channelID}/thread-members/@me`; | ||
} | ||
/** | ||
* `/channels/{channel.id}/thread-members/{user.id}` | ||
* - PUT - Adds another member to a thread | ||
* - DELETE - Removes another member from a thread | ||
*/ | ||
public static THREAD_MEMBER(channelID: string, userID: string) { | ||
return `/channels/${channelID}/thread-members/${userID}`; | ||
} |
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'm not sure, what did we do for other similar endpoints?
I'm not against specific /@me endpoint, although I do agree it's legitimate to combine.
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.
other than that seems good so far?
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.
Again, endpoint descriptions should be the endpoint name on Discord, i.e. POST START_THREAD_WITH_MESSAGE be Start Thread with Message
Apart from the naming and Bsian point, this PR seems globally ready I think. Do we have anything else to change for API v9? |
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.
Can you revert all the src/
changes
This PR
ws\constants.ts
.structures\Guild.ts
andsrc\util\Constants.ts
.src\Client.ts
andrest\Endpoints.ts
.rest\RESTClient.ts
Notes:
src\util\Constants.ts
is outdated and needs to be updated in another PR.