mirror of
https://github.com/discordjs/discord.js.git
synced 2026-07-21 13:42:56 +00:00
feat(UsersAPI): add deleteApplicationRoleConnection() method (#11530)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
@@ -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,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user