diff --git a/src/account.ts b/src/account.ts index a3498ff..04936a9 100644 --- a/src/account.ts +++ b/src/account.ts @@ -194,12 +194,11 @@ export async function createAccount(email: string, username: string, password: s * Deletes an account (Requires authenication) * @param id the ID of the account to delete */ -async function _delete(id: string): Promise { +export async function deleteAccount(id: string, reason?: string): Promise { checkAccountAttribute('id', id); - await request('POST', account_endpoint, { action: 'delete', id }); + await request('POST', account_endpoint, { action: 'delete', id, reason }); return; } -export { _delete as deleteAccount }; /** * Requests info about an account