feat: add links to each routes documentation (#8898)

This commit is contained in:
Almeida
2022-12-07 16:32:55 +00:00
committed by GitHub
parent 3dede75621
commit 73300c75fa
10 changed files with 161 additions and 0 deletions

View File

@@ -24,6 +24,7 @@ export class ThreadsAPI {
/**
* Fetches a thread
*
* @see {@link https://discord.com/developers/docs/resources/channel#get-channel}
* @param threadId - The id of the thread
*/
public async get(threadId: Snowflake) {
@@ -33,6 +34,8 @@ export class ThreadsAPI {
/**
* Creates a new thread
*
* @see {@link https://discord.com/developers/docs/resources/channel#start-thread-from-message}
* @see {@link https://discord.com/developers/docs/resources/channel#start-thread-without-message}
* @param channelId - The id of the channel to start the thread in
* @param data - The data to use when starting the thread
*/
@@ -43,6 +46,7 @@ export class ThreadsAPI {
/**
* Creates a new forum post
*
* @see {@link https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel}
* @param channelId - The id of the forum channel to start the thread in
* @param data - The data to use when starting the thread
*/
@@ -60,6 +64,7 @@ export class ThreadsAPI {
/**
* Adds the current user to a thread
*
* @see {@link https://discord.com/developers/docs/resources/channel#join-thread}
* @param threadId - The id of the thread to join
*/
public async join(threadId: Snowflake) {
@@ -69,6 +74,7 @@ export class ThreadsAPI {
/**
* Adds a member to a thread
*
* @see {@link https://discord.com/developers/docs/resources/channel#add-thread-member}
* @param threadId - The id of the thread to add the member to
* @param userId - The id of the user to add to the thread
*/
@@ -79,6 +85,7 @@ export class ThreadsAPI {
/**
* Removes the current user from a thread
*
* @see {@link https://discord.com/developers/docs/resources/channel#leave-thread}
* @param threadId - The id of the thread to leave
*/
public async leave(threadId: Snowflake) {
@@ -88,6 +95,7 @@ export class ThreadsAPI {
/**
* Removes a member from a thread
*
* @see {@link https://discord.com/developers/docs/resources/channel#remove-thread-member}
* @param threadId - The id of the thread to remove the member from
* @param userId - The id of the user to remove from the thread
*/
@@ -98,6 +106,7 @@ export class ThreadsAPI {
/**
* Fetches a member of a thread
*
* @see {@link https://discord.com/developers/docs/resources/channel#get-thread-member}
* @param threadId - The id of the thread to fetch the member from
* @param userId - The id of the user
*/
@@ -108,6 +117,7 @@ export class ThreadsAPI {
/**
* Fetches all members of a thread
*
* @see {@link https://discord.com/developers/docs/resources/channel#list-thread-members}
* @param threadId - The id of the thread to fetch the members from
*/
public async getAllMembers(threadId: Snowflake) {