feat(UsersAPI): add deleteApplicationRoleConnection() method (#11530)

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
Kshitij Anurag
2026-07-17 03:36:13 +05:30
committed by GitHub
parent 6e81ea771d
commit bf55791a6d
+19 -2
View File
@@ -150,7 +150,7 @@ export class UsersAPI {
/**
* Gets the current user's active application role connection
*
* @see {@link https://discord.com/developers/docs/resources/user#get-user-application-role-connection}
* @see {@link https://docs.discord.com/developers/resources/user#get-current-user-application-role-connection}
* @param applicationId - The id of the application
* @param options - The options for fetching the role connections
*/
@@ -167,7 +167,7 @@ export class UsersAPI {
/**
* Updates the current user's application role connection
*
* @see {@link https://discord.com/developers/docs/resources/user#update-user-application-role-connection}
* @see {@link https://docs.discord.com/developers/resources/user#update-current-user-application-role-connection}
* @param applicationId - The id of the application
* @param body - The data for updating the application role connection
* @param options - The options for updating the application role connection
@@ -183,4 +183,21 @@ export class UsersAPI {
signal,
}) as Promise<RESTPutAPICurrentUserApplicationRoleConnectionResult>;
}
/**
* Deletes the current user's application role connection
*
* @see {@link https://docs.discord.com/developers/resources/user#delete-current-user-application-role-connection}
* @param applicationId - The id of the application
* @param options - The options for deleting the application role connection
*/
public async deleteApplicationRoleConnection(
applicationId: Snowflake,
{ auth, signal }: Pick<RequestData, 'auth' | 'signal'> = {},
) {
await this.rest.delete(Routes.userApplicationRoleConnection(applicationId), {
auth,
signal,
});
}
}